home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ANIVGA.ZIP / ANIVGA.DIC < prev    next >
Text File  |  1992-08-16  |  110KB  |  3,595 lines

  1. DoffsetXTiles:=(StartVirtualX-BackX1+15)DIV16
  2. EoffsetXTiles:=(StartVirtualX-BackX1+15)DIV16
  3. DoffsetYTiles:=(StartVirtualY-BackY1+15)DIV16
  4. EoffsetYTiles:=(StartVirtualY-BackY1+15)DIV16
  5. DoffsetXTiles:=(StartVirtualX-BackX1+15) DIV 16
  6. EoffsetXTiles:=(StartVirtualX-BackX1+15) DIV 16
  7. DoffsetYTiles:=(StartVirtualY-BackY1+15) DIV 16
  8. EoffsetYTiles:=(StartVirtualY-BackY1+15) DIV 16
  9. Dbottomcut:=(ypix-200) AND $F
  10. Ebottomcut:=(ypix-200) AND $F
  11. D(0,y) =
  12. E(0,y) =
  13. DDI:=y*LINESIZE+(0 div 4)=y*LINESIZE
  14. EDI:=y*LINESIZE+(0 div 4)=y*LINESIZE
  15. DLINESIZE
  16. ELINESIZE
  17. DStatusReg
  18. EStatusReg
  19. D"AND $FFF0" kann dabei entfallen, da in BackX1
  20. E"AND $FFF0" isn't needed, because in BackX1, the
  21. Dsqrt
  22. Esqrt
  23. DBX:=hoehe (fuer spaeter)
  24. EBX:=height (to be used later)
  25. DName des zu ladenden Palette-Files (Typ: "*.PAL" )
  26. Ename of the palette file (type: "*.PAL") to load
  27. Dakt_SpriteX
  28. Eakt_SpriteX
  29. D--- "Abkuerzung" ueber WriteMode 1 moeglich!:
  30. E--- short-cut possible, using write mode1:
  31. D--- "Abkuerzung" ueber WriteMode 1 moeglich!
  32. E--- short-cut possible, using write mode1
  33. Detwas spaeter wird dann DS (ES) = Segment der Spr.daten von Spr.1 (2)
  34. Ea little bit later DS (ES) will be set to segment of spr. 1 (2) data
  35. Dd.h.: sie ist nur fuer einen Animationszyklus sichtbar (soll sie
  36. Eimage, that is: it will be visible only for one animation cycle (if
  37. D(BackX1,BackY1), (BackX2,BackY2) = auf 16er Raster gerundete Koord.
  38. E(BackX1,BackY1), (BackX2,BackY2) = coordinates, rounded to 16-grid
  39. Dmuss im Stapel liegen (da DS andersweitig belegt wird!
  40. Emust be in stack (DS will be used for other purposes!
  41. Dauf 16er Raster gerundete Koord.
  42. Ecoord., rounded to 16'grid
  43. Dzuerst Linie auf sichtbaren Bereich zurechtklippen; dazu Sutherland-
  44. Efirst clip line to visible window; use Sutherland-Cohen-algorithm:
  45. Dmuss im Stapel liegen (da DS andersweitig belegt wird!)
  46. Emust lie in stack (because DS is used for other purposes!)
  47. DSegment_Adr
  48. ESegment_Adr
  49. DVersionsnummer
  50. Eversion number
  51. DBei Uebergabe von NIL als Zeiger stellt die Routine gar nicht dar;
  52. EWhen supplying NIL as pointer, the routine won't display anything
  53. Dgegen die der Farbtabelle "ShadowTab" ersetzt (um bspw. Schatten zu er-
  54. Ethose of the color lookup table "ShadowTab" (e.g.: to realize shadows,
  55. Dseite ab, beginnend mit der uebergebenen Nummer number
  56. Epage, starting with the given number "number"
  57. DDer Punkt wird NICHT automatisch in den Hintergrundspeicher ueber-
  58. EThe pixel will NOT automatically be overtaken into the background
  59. DBei Uebergabe von NIL als Zeiger stellt die Routine gar nichts dar
  60. EIf you supply NIL as pointer, the routine will display nothing
  61. Dnegativer
  62. Enegative
  63. Dzeigt genau hinter den Header
  64. Epoints exactly behind the header
  65. Dbester Naeherungswert fuer "newColor"
  66. Ebest fit for "newColor"
  67. Dkein Treffer in X-Richtung -> ueberhaupt kein Treffer!
  68. Eno collision in X-direction -> no collision at all!
  69. DZeilenzaehler
  70. Erow counter
  71. Dkeitsanpassung an unterschiedlich schnelle Rechner, ...
  72. ECPU-clocks, ...
  73. Dzeilenadr
  74. Ezeilenadr
  75. Daeusserer Schleifenzaehler
  76. Eouter loop-counter
  77. Drem: Alle nicht ueberschriebenen Farben werden in "pal" auf die Werte der
  78. Erem: All entries in "pal" which get not overwritten by the file's contents
  79. D2..3   DW Plane_1_Daten
  80. E2..3   DW offset_ptr_to_plane1_data
  81. Dof FadeIn
  82. Eof FadeIn
  83. DOffsetanteil des Zeigers zu den Planeadr. addieren
  84. Eadd pointer's offset part to the plane address
  85. D- flickerfreie Animation durch page-flipping, Auswertung des vertikalen
  86. E- flickerfree animations by using page-flipping, vertical retrace infor-
  87. Dist es ein Farbbildschirm?
  88. Eis it a color display?
  89. DLES DX,Ziel  ;nach ES:DX
  90. ELES DX,Ziel  ;to ES:DX
  91. D#4
  92. E#4
  93. D14.
  94. E14.
  95. DINT 10h
  96. EINT 10h
  97. D3BAh/3DAh = Status-Register fuer monochrom/Farbe
  98. E3BAh/3DAh = state register for monochrome/color
  99. D3B4h/3D4h = CRTAddress-Register fuer monochrom/Farbe
  100. E3B4h/3D4h = CRTAddress-register for monochrome/color
  101. DES
  102. EES
  103. DDS
  104. EDS
  105. Dzu movende Zeile
  106. Erow to move
  107. DQuelladresse
  108. Esource address
  109. Dzu je
  110. E,
  111. Dwurde:
  112. Eroutines above:
  113. DFuer den ersten Animationszyklus nach Aufruf dieser Routine
  114. EBecause of TimeFlag:=$80, the timing mechanism won't work
  115. Dfuer "leere Spalte"?
  116. Efor "empty column"?
  117. Dauch 2.Sprite pruefen: "leere Spalte"?
  118. Echeck 2nd sprite too: "empty column"?
  119. Dfuehrt wird, wenn leftcut mod 4=0, also 16+3-leftcut=...11b, die
  120. Eonly be run if leftcut mod 4=0, thus 16+3-leftcut=...11b, the
  121. DFuellfarbe fuer die Seite
  122. Ecolor with which to fill the page
  123. Dd.h.: "Rechner ist ein PC" vorgetaeuscht. Sonst ist IsAT=0
  124. Ethe routine will fake "computer is a PC". Else IsAT=0
  125. Dzu setzende Palette
  126. Epalette to be set
  127. DAX = endy*max_breite_in_4er =yoffset
  128. EAX=endy*max_width_in_groups_of_4=yoffset
  129. Dmin(a,b)
  130. Emin(a,b)
  131. DVerwaltung von bis zu 1000 verschiedenen Sprites
  132. EManages up to 1000 different sprites
  133. Dberechne relativen X-Abstand vom linken Rand des
  134. Ecompute relative X-distance from left edge of
  135. Dseite), zeichnet alle sichtbaren Sprites, synchronisiert auf das dis-
  136. Einformation), draws all visible sprites, synchronizes to the display-
  137. Djede Zeile dabei in der Reihenfolge von links nach rechts
  138. Eeach row from left to right
  139. Dwelcher Hintergrundmodus?
  140. Ewhich background mode?
  141. Dletztes Sprite zeigt auf erstes
  142. Elast sprite points to first one
  143. DFehlercodes des Animationspaketes:
  144. Eerror codes of the animation package:
  145. DDefaultwerte entsprechen Abdunkelung auf 70% des Farb-Helligkeitswerts
  146. Edefault values correspond to a darkening to 70% of the original brightness
  147. DDefaultfarben-Palette des 256-Farbmodus
  148. Edefault palette colors of 256color mode
  149. DFeatures:
  150. EFeatures:
  151. DRetracesignals und Verwendung eines speziellen VGA-256-Farbengrafikmodus
  152. Emation and a special "tweaked" VGA-256-color graphicmode
  153. Dlen = Laenge des zu definierenden Spritezyklus
  154. Elen = length of your sprite cycle
  155. DtempColors
  156. EtempColors
  157. DError
  158. EError
  159. Dist das ein AT/386? ($0/$80=ja/nein)
  160. Eis this an AT or better? ($0/$80=yes/no)
  161. Dx+15-xmax
  162. Ex+15-xmax
  163. Dy+15-ymax
  164. Ey+15-ymax
  165. DShadowTab  = (Naeherungs-)Farbtabelle fuer gewuenschte Abdunkelung
  166. EShadowTab  = (best approximation) color table for wanted dimming
  167. D[dec(startx,bildschirmstartx)
  168. E[dec(startx,ScreenStartX)
  169. Dout: Anzahl der aus dem File gelesenen Farben (0 = Fehler trat auf)
  170. Eout: number of colors read from the file (0 = an error occured)
  171. Dzum Bsp.:  xxrxxxxx, mit: r=rot=40, g=gruen=45, b=blau=35, x=weiss=30
  172. Efor ex.:   xxrxxxxx, with: r=red=40, g=green=45, b=blue=35, x=white=30
  173. Dx2last
  174. Ex2last
  175. Dy2last
  176. Ey2last
  177. D22..23 DW ?            ; bildx          | hit2xfirst
  178. E22..23 DW ?            ; bildx          | hit2xfirst
  179. Dleft
  180. Eleft
  181. Djetzt
  182. Enow
  183. Dleft_to_right
  184. Eleft_to_right
  185. DDer Inhalt der Seite "pa" wurde auf die Seite 1-PAGE kopiert
  186. Ethe contents of page "pa" has been copied to page 1-PAGE
  187. Dseite), zeichnet alle sichtbaren Sprites, synchronisiert auf das vert.
  188. Eimage), draws all visible sprites, synchronizes to the vertical
  189. DNextSprite[nr] bis NextSprite[nr+len-1] wurden so gesetzt,
  190. ENextSprite[nr] through NextSprite[nr+len-1] have been set
  191. Ddeshalb: AH:=Kachel und anschliessend AX um 2 Bit
  192. Etherefore: set AH:=tile and afterwards, shift AX
  193. Dgesetzt werden; hier der Einfachheit immer neugesetzt
  194. Efor simplicity, we always reset it here
  195. Dzelnes Sprite oder eine ganze Spritebibliothek handelt und laedt
  196. Etains a single sprite or a complete sprite library and loads all
  197. DUeberpruefung statt!
  198. Edoesn't make any checks!
  199. Dkein Clipping statt
  200. Eno check for that
  201. Dgesetzt, eine evtl. noetige Leseplane dagegen nicht!
  202. Eready been set, but not that for the evtl. needed read plane!
  203. Dgegebenen Grafikseite gefuellt.
  204. Etents of the supplied graphic page.
  205. DVerschiebung um 3 Bit:
  206. Edisplacement of 3 bit:
  207. DVerschiebung um 2 Bit:
  208. Edisplacement of 2 bit:
  209. DVerschiebung um 1 Bit:
  210. Edisplacement of 1 bit:
  211. Dselbstgestrickter 6x6 Font
  212. Eselfmade 6x6 font (ugly..)
  213. DRest wie gehabt
  214. Erest as above
  215. DDer Punkt (x,y) wurde in absolute Bildschirmkoordinaten umgerechnet
  216. EThe point (x,y) has been transformed to absolute screen coordinates
  217. DDer Punkt (x,y) wird zunaechst auf 16er Raster gebracht!
  218. EThe point (x,y) first gets rounded to a grid with mesh 16
  219. DDer Bildausschnitt wurde zur Bildschirmdarstellung zurechtgeklippt
  220. EThe cutting has been properly clipped before being displayed
  221. DDer benoetigte Speicher wird von der Routine automatisch reserviert
  222. EThe memory needed will be reserved by the routine automatically
  223. DZeiger auf Heapbereich, der den kopierten Bildausschnitt enthaelt
  224. Epointer to heap address where the copied screen area is stored
  225. Dneue Farbe=alte, abgedunkelt auf "brightness" Prozent:
  226. Enew color=old one, darkened to "brightness" percent:
  227. Dnein, keine moeglich oder nicht gewuenscht
  228. Eno, none possible or not wanted
  229. DJetzt ueberpruefen, ob gesetzte Zyklus(mindest)zeit abgelaufen ist:
  230. ECheck whether the preset (min.) cycle time has passed:
  231. DJetzt obere rechte Eck-Kachel - falls nicht schon gezeichnet:
  232. ENow the upper right corner-tile - if not already drawn:
  233. DJetzt die untere rechte Tile - falls sie nicht bereits schon gezeichnet
  234. ENow draw the lower right tile - if it doesn't have been drawn by one of
  235. DFehlerwert
  236. Eerror value
  237. DZeiger auf (durch GetImage erstellten) Bildausschnitt
  238. Epointer to the cutting (returned by GetImage)
  239. Dleftcut
  240. Eleftcut
  241. Dneue Helligkeit
  242. Enew brightness
  243. DSetShadowTab(Schatten) kann entfallen, da Defaultwerte schon gesetzt!
  244. ESetShadowTab(Schatten) isn't needed, as the default values are set already
  245. Dwrap-around, deshalb: Adresse um 1 erhoehen, was
  246. Ewrap-around, thus: increment address by 1, which
  247. Dbreite,hoehe und Teile oberhalb des Bildschirms
  248. Ewidth,height and parts above the screen
  249. DBreite,Hoehe des def. Bereiches
  250. Ewidth, height of defined area
  251. DGroesse einer Zeile=80 Bytes
  252. Esize of one row=80 bytes
  253. Dnr  = Spriteladenummer des ersten Sprites des Zyklus
  254. Enr  = spriteloadnumber of the first sprite in the cycle
  255. Dbrightness
  256. Ebrightness
  257. DSI
  258. ESI
  259. DDI
  260. EDI
  261. DSchaltet die VGA-Karte in den 320x200x256x4-Modus; ACHTUNG!
  262. Eswitches the VGA-card into 320x200x256x4-mode; ATTENTION!
  263. Dypix:=(16-StartVirtualY) AND $F
  264. Eypix:=(16-StartVirtualY) AND $F
  265. Dxpix=rightcut:=(16-StartVirtualX) AND $F
  266. Expix=rightcut:=(16-StartVirtualX) AND $F
  267. D1 Byte plus Length(PICHeader) als Kennung
  268. E1 byte plus length(PICHeader) as tag
  269. DAuf "display enable"=0 (d.h.: aktiv) warten, so dass Seitenumschaltung
  270. EWait for "display enable"=0 (that is: active), so that page flipping
  271. Dmuss zwischen 0 und 15 liegen, 16 ist erlaubt (aber unsinnig)!
  272. Emust lie between 0..15, 16 is allowed (but senseless)!
  273. Dzu je 1 Byte plus Length(PICHeader) als Kennung
  274. Eat 1 byte each, plus length(PICHeader) as tag
  275. Dnur diese 3 Modi sind zulaessig
  276. Eonly these 3 modes are allowed
  277. DFuer Maskenadressierung
  278. EFor mask addressing
  279. Dmuss Werte zwischen 0..15 haben, 16 ist unzulaessig!
  280. Emust have a value in the range 0..15, 16 is not allowed!
  281. Dauszugebender Textstring
  282. Etextstring to be displayed
  283. Dmuss zwischen 0 und 15 liegen, 16 ist erlaubt (aber unsinnig)
  284. Emust lie in the range 0..15, 16 is allowed (but senseless)
  285. Dnur diese 4 Modi sind zulaessig
  286. Eonly these 4 modes are allowed
  287. Dgute Parameter sind z.B. Summen von Zweierpotenzen +1
  288. Ee.g., good values are sums of powers of 2 +1
  289. Dauch nach [@Starty_2+1]
  290. Estore it in [@Starty_2+1], too
  291. Dsichtbare) Grafikseite, auf die gezeichnet wird
  292. Evisible) graphic page on which to draw
  293. DWie OutTextXY(), aber es wird in den Hintergrund geschrieben und
  294. EFunctionally equivalent to OutTextXY(), but the text will be
  295. DLiegt der Punkt ausserhalb des sichtbaren Bereichs, so wird
  296. EIf the pixel lies outside the visible window, the routine
  297. Deintragen: CX=HIGH-Word, DX=LOW-Word
  298. Eseconds: CX=HIGH-Word, DX=LOW-Word
  299. DDie Anwendung dieser Routine ist nur fuer den Hintergrund-
  300. ECalling this routine only makes sense when using SCROLLING
  301. DDie Anwendung dieser Routine ist natuerlich nur fuer den Hintergrund-
  302. EObviously, calling the routine only makes sense when using SCROLLING
  303. Dmin(a,b)>=max(c,d) ?
  304. Emin(a,b)>=max(c,d) ?
  305. Dlinke obere Ecke des Bereiches (virtuelle Koord.)
  306. Eupper left corner of the area (in virtual coord.)
  307. DFilename fuer das zu ladende Bild
  308. Efile name for the picture to load
  309. DFilename fuer das abzuspeichernde Bild
  310. Efile name for the picture to store
  311. DFilename fuer das zu ladende Hintergrundbild
  312. Efile name for the background picture to load
  313. DFilename fuer das abzuspeichernde Hintergrundbild
  314. Efile name for the background picture to store
  315. DBit 6:=1: Adressierung des Speichers=lineares Bitfeld
  316. Ebit 6:=1 -> address memory as a linear bit array
  317. DCL=0/1 fuer offscreenFlag=false/true=(yt<0) OR (yt>=YTiles
  318. ECL=0/1 for offscreenFlag=false/true=(yt<0) OR (yt>=YTiles)
  319. DCL=0/1 fuer offscreenFlag=false/true=(yt<0) OR (yt>=YTiles)
  320. ECL=0/1 for offscreenFlag=false/true=(yt<0) OR (yt>=YTiles)
  321. DGraphTextBackground=Farbe fuer Texthintergrund;ist dieser Wert
  322. EGraphTextBackground=color to be used for text background; if
  323. Dorand1+2*hit1xfirst
  324. Eorand1+2*hit1xfirst
  325. DGrafikseite "pa" wurde mit der Farbe "Color" gefuellt
  326. Egraphic page "pa" has been filled with color "Color"
  327. Derste Zieladresse ist
  328. Efirst dest. addr. is
  329. DError wurde gesetzt, falls keine VGA-Karte im System enthalten ist
  330. EError has been set, if no VGA-card could be found in the system
  331. DTrick, da der Assembler nicht mit dem SS-Segment klarkommt
  332. Etrick, as the assembler messes up accesses to the SS-segment
  333. D1.Zeile zeichnen
  334. Edraw 1st row
  335. Ddto. fuer gruenen Farbanteil...
  336. Edto. for green color part...
  337. Dxtil
  338. Extil
  339. Dytil
  340. Eytil
  341. D; Bereich:
  342. E; variables: ("a|b" = used for a and b)
  343. D0128: CLD
  344. E0128: CLD
  345. D...und fuer den blauen Anteil auch
  346. E...repeat computation for blue part
  347. DNun alle anderen oberen Kacheln, die nur oben (aber nicht seitlich)
  348. ENow work on all other upper tiles, which are cut at their top (but
  349. DAuch hier gilt, dass der gezeichnete Punkt NICHT automatisch
  350. EAgain, the drawn pixel will _NOT_ automatically be taken
  351. Dpunkte, deren Farbe <>0 ist beruecksichtigt: die Hintergrundfarbe, die sich
  352. Epixels with color <>0 will be processed: the background color, which is
  353. Dout: (BackX1,BackY1), (BackX2,BackY2) =
  354. Eout: (BackX1,BackY1), (BackX2,BackY2) =
  355. DQuellzeiger:=sprite[WORD PTR (licutoff_in_Punkten+0 AND 3)*2
  356. Esource pointer:=sprite[WORD PTR (lecutoff_in_points+0 AND 3)*2
  357. DPunkt1 unterhalb von Punkt2 ?
  358. Epoint1 below point2 ?
  359. DPunkt1 rechts von Punkt2 ?
  360. Epoint1 right of point2 ?
  361. D16 horizontale Punkte = 4 Bytes pro Zeile
  362. E16 horizontal pixels = 4 bytes per line
  363. DBildschirmmitte
  364. Emiddle of screen
  365. DEinschub Ende
  366. Eend of insertion
  367. Dsichtbare Grafikseite
  368. Evisible graphic page
  369. Dsichtbare Seite
  370. Evisible page
  371. Dtime
  372. Etime
  373. Dvirtuelle
  374. Evirtual
  375. DDie Bitmap-Grafik in der Datei "name" wurde in die Hintergrundseite
  376. EThe bitmap-picture contained in file "name" has been loaded to the
  377. Dfieser Trick: "CALL Modus2Work" wuerde (da re-
  378. Esort of hack: "CALL Modus2Work" would be coded
  379. Deinbeziehen (plus 4 Bytes zum ueberspringen von "breite" und "hoehe"
  380. Eleft cutoff (+4 bytes to jump over "breite" (width) and "hoehe" (height)
  381. DBitplanes/-breiten in der richtigen Reihenfolge
  382. Esource bitplanes/-widths in the correct order
  383. DSinnvoll sind nur die Seiten 0 oder 1, es findet aber keine
  384. ESensible page values are only 0 or 1 here, but the routine
  385. Dnicht in die durch PAGEADR spezifizierte Seite!
  386. Ewritten to the background page instead of page PAGEADR!
  387. Ddiese Routine VOR dem Aufruf von ANIMATE auszufuehren, da dann alle
  388. Ewill call this routine BEFORE calling ANIMATE, because this way, all
  389. DDies hilft fuer eine direkte Uebernahme der von GetImage gelie-
  390. EThat is useful when you are going to use the routine directly on
  391. Dsichtbar ist immer die nichtaktuelle Grafikseite
  392. EALWAYS is the non-actual graphic page the visible one!
  393. Ddie Zieladresse
  394. Ethe destination address
  395. Ddie Quelladresse
  396. Ethe source address
  397. Dlinke
  398. Eleft
  399. Dlinke obere Ecke der zu zeichnenden Tile
  400. Eupper left corner of the tile to be drawn
  401. Dlinke obere Bildschirmecke
  402. Eupper left image corner
  403. DDiese Datei ist 4*PAGESIZE+3 = 64003 Bytes gross: 320x200 Punkte
  404. EThis file has size 4*PAGESIZE+3 = 64003 bytes: 320x200 points
  405. DHintergrundseite(nadresse)
  406. Ebackground page(address)
  407. DDisplay_UNKNOWN, wenn das Sprite noch nicht geladen wurde!
  408. EDisplay_UNKNOW, if the sprite hasn't been loaded, yet!
  409. D--- falls Abkuerzung genommen wurde, muss WriteMode 0 wieder
  410. E--- if short-cut has been taken we must restore write mode 0
  411. D*4 = Breite in Punkten
  412. E*4 = width in points
  413. D44..45 DW rechte_Begrenzungen
  414. E44..45 DW offset_ptr_to_right_boundary_data
  415. D...gefolgt von der Hoehe, danach dann die Daten
  416. E...then store height, followed by the data
  417. Dwg. actIndex=yt*XTiles+xt auch actIndex erhoehen
  418. Ebecause actIndex=yt*XTiles+xt do increment actIndex, too
  419. DFOR true_radius:=1 TO k STEP 1/adjust ist in Pascal leider nicht moeglich!
  420. Eunfortunately, FOR true_radius:=1 TO k STEP 1/adjust isn't possible in TP
  421. Dnur Seiten 0..3
  422. Eonly pages 0..3
  423. DDX=ueberhang:=xmax-(SpriteX+endx)
  424. EDX=overhang :=xmax-(SpriteX+endx)
  425. DAX=bildschirmstartx:=SpriteX+startx
  426. EAX=ScreenStartX:=SpriteX+startx
  427. Dsichtbar! (Deshalb ist es sinnvoll, diese Routine NACH Aufruf
  428. E(For that reason, you should call this routine AFTER
  429. DBitmaske fuer Zugriff
  430. Ebitmask for access
  431. D- volle Unterstuetzung der 256-Farbmoeglichkeiten der VGA-Karte
  432. E- full use of the VGA's 256-color mode
  433. Dtiles:=19+ord(leftcut=0)
  434. Etiles:=19+ord(leftcut=0)
  435. Ddie erste Zieladresse ist DI:=0*LINESIZE+(0 div 4)=0
  436. Ethe first dest. addr. is DI:=0*LINESIZE+(0 div 4)=0
  437. DoffsetXTiles
  438. EoffsetXTiles
  439. DoffsetYTiles
  440. EoffsetYTiles
  441. DBACKGNDPAGE geladen
  442. Ebackground page BACKGNDPAGE
  443. Ddto. fuer Abstand der y-Koordinate vom oberen
  444. Edto. for distance between the y-coordinate and
  445. DStartplane anwaehlen
  446. Eselect start plane
  447. Ddto. fuer Planebreiten:
  448. Edto. for plane widths:
  449. Ddto., oben
  450. Edto., at the top
  451. Ddto., unten
  452. Edto., bottom
  453. D15
  454. E15
  455. D#5
  456. E#5
  457. D15.
  458. E15.
  459. DEinschub fuer Zeitbedingung:
  460. Einsertion to realize timing:
  461. DRichtung
  462. Edirection
  463. DDiese Prozedur sollte einmal - ganz zu Beginn - zur Initialisierung
  464. EThis procedure should be called only once - namely in the very
  465. Dtine fuehrt dabei selber alle notwendigen Umrechnungen und Clipping-
  466. Eself takes care of coordinate transformations and evtl. necessary
  467. DHierher kommt die Routine zur Datenuebertragung!
  468. Ethis is the address where the data transfer routine will be patched!
  469. DTimeFlag
  470. ETimeFlag
  471. D26..27 DW ?            ; end_min_start  | ueberlappx_1
  472. E26..27 DW ?            ; end_min_start  | ueberlappx_1
  473. Dueberlappx
  474. Eueberlappx
  475. D1 Pixel=1 Byte; dazu: 2 Woerter fuer breite & hoehe
  476. E1 pixel=1 byte; add 2 words for width & height
  477. Dlirand1
  478. Elirand1
  479. DWindowX1
  480. EWindowX1
  481. Dzielzeiger:=(bildschirmstartx+1)
  482. Edest. ptr :=(ScreenStartX+1)
  483. Dminx-maxx-1=-(maxx-minx+1)
  484. Eminx-maxx-1=-(maxx-minx+1)
  485. Dsichtbare Breite dieser Zeile -1
  486. Evisible width of this row -1
  487. Ddto.
  488. Edto.
  489. Ddto.,
  490. Edto.,
  491. DSinnvoll sind nur die Seiten 0,1 und BACKGNDPAGE, jedoch
  492. EOnly "pa" values of 0,1 and BACKGNDPAGE make sense, but
  493. DDie li. obere Ecke wird nach links oben gezogen, die re. untere nach
  494. EThe upper left corner will be torn to the upper left, the lower
  495. DBit 7 = 0/1 fuer Zeit ist abgelaufen/laeuft noch
  496. Ebit 7 = 0/1 for delay completed/not yet completed
  497. Deinfaches horizontales und vertikales Scrolling moeglich
  498. Esimple creation of horizontal/vertical "scrolling" applications
  499. D36..37 DW ?            ;                | y2
  500. E36..37 DW ?            ;                | y2
  501. Dueberlappy
  502. Eueberlappy
  503. Dlirand2
  504. Elirand2
  505. DZielseite, in die das Bild geladen werden soll (0..2)
  506. Edestination page to be loaded with the picture (0..2)
  507. DZielseite, in die das Bild geladen werden soll (=2)
  508. Edestination page, in which to load the picture (=2)
  509. Dxrgrxxxx
  510. Exrgrxxxx
  511. DSHR
  512. ESHR
  513. Dist SCROLLPAGE ebenfalls erlaubt
  514. ESCROLLPAGE is allowed, too
  515. DEs wurde auf die Darstellung der Grafikseite pa umgeschaltet
  516. EThe display has been switched to graphic page pa
  517. DEs werden die Defaultfarben des Modus $13 gesetzt!
  518. EThe default colors of mode $13 will be set!
  519. Dauf den zurueckgeschaltet werden soll
  520. Eto which we'll switch back
  521. Ddung der Routine nur fuer den Hintergrundmodus STATIC sinnvoll!
  522. Etine only makes sense when using background mode STATIC!
  523. Dzu zeichnende Zeilenzahl
  524. Enumber of rows to draw
  525. Dzu zeichnende Zeilenanzahl
  526. Enumber of rows to draw
  527. DNummer, die das erste Sprite aus diesem File bekommen soll
  528. Enumber for the first sprite of this file
  529. Dfuer Gruenanteil
  530. Efor green part
  531. Dfuer Blauanteil
  532. Efor blue part
  533. DNummer, die die erste Farbe aus diesem File bekommen soll
  534. Enumber for the first color being read in from the file
  535. D16..17 DW SpriteLength ; Laenge der Spritedatei
  536. E16..17 DW SpriteLength ; length of this sprite in bytes
  537. Dti
  538. Eti
  539. Dhierher, wenn heller: maximale Abwei-
  540. Ejump here, if brighter: return max.
  541. DDie Linie wird NICHT sofort sichtbar, sondern erst im naechsten Ani-
  542. EThe line will NOT be visible until the next animation cycle takes
  543. Dverwendeter Zeichensatz:
  544. Eused font:
  545. DBX=[zeilenadr]     = (endy+SpriteY)*LINESIZE
  546. EBX=[zeilenadr]     = (endy+SpriteY)*LINESIZE
  547. Ddie Seite, die gefuellt werden soll (0..3)
  548. Ethe page which shall be filled (0..3)
  549. DBitplane (0..3) (=X-Koordinate AND 3)
  550. Ebitplane (0..3) (=X-coordinate AND 3)
  551. DZeiger auf 1. (2.) Sprite in ?WRTD[..] ,
  552. Epointer to 1. (2.) sprite in ?WRTD[..] ,
  553. DPseudoprozedur, um Daten der Farbumsetztabelle im Codesegment unterzu-
  554. EPseudo-procedure to store the color lookup table into the code segment
  555. D4..5   DW Plane_2_Daten
  556. E4..5   DW offset_ptr_to_plane2_data
  557. Dihren ersten zwei Bytes paarweise verschieden sein!
  558. Ewise disjoint in their first two bytes!
  559. Dthen
  560. Ethen
  561. DShadowTab neu/nicht neu berechnen
  562. Erecompute/don't recompute ShadowTab
  563. Dfuer: Zeit laeuft noch/ist um
  564. Efor: delay still lasts/has ended
  565. D16 horizontale Punkte = 4 Bytes pro Zeile: BX:=4
  566. E16 horizonzal points = 4 bytes per row: BX:=4
  567. Ddie erste Zieladresse ist DI:=y*LINESIZE+(x div 4)
  568. Ethe first destination addr. is DI:=y*LINESIZE+(x div 4)
  569. DDie erste Zieladresse ist DI:=0*LINESIZE+(x div 4) = x div 4
  570. EThe first destination address is DI:=0*LINESIZE+(x div 4)=x div 4
  571. DSegment_Adr[1-PAGE]
  572. ESegment_Adr[1-PAGE]
  573. Dzeilenadr:=(endy+SpriteY)*LINESIZE
  574. Ezeilenadr:=(endy+SpriteY)*LINESIZE
  575. Dneuer PAGEADR-Wert := Segment_Adr[PAGE]
  576. Enew PAGEADR-value := Segment_Adr[PAGE]
  577. DDrawUpperTile(x,topcut:INTEGER; index:WORD);
  578. EDrawUpperTile(x,topcut:INTEGER; index:WORD);
  579. DDrawUpperRightTile(x,rightcut,topcut:INTEGER; index:WORD);
  580. EDrawUpperRightTile(x,rightcut,topcut:INTEGER; index:WORD);
  581. DDrawUpperLeftTile(leftcut,topcut:INTEGER; index:WORD);
  582. EDrawUpperLeftTile(leftcut,topcut:INTEGER; index:WORD);
  583. DDrawRightTile(x,y,rightcut:INTEGER; index:WORD);
  584. EDrawRightTile(x,y,rightcut:INTEGER; index:WORD);
  585. DDrawLowerTile(x,y,bottomcut:INTEGER; index:WORD);
  586. EDrawLowerTile(x,y,bottomcut:INTEGER; index:WORD);
  587. DDrawLowerRightTile(x,y,rightcut,bottomcut:INTEGER; index:WORD);
  588. EDrawLowerRightTile(x,y,rightcut,bottomcut:INTEGER; index:WORD);
  589. DDrawLowerLeftTile(y,leftcut,bottomcut:INTEGER; index:WORD);
  590. EDrawLowerLeftTile(y,leftcut,bottomcut:INTEGER; index:WORD);
  591. DDrawLeftTile(y,leftcut:INTEGER; index:WORD);
  592. EDrawLeftTile(y,leftcut:INTEGER; index:WORD);
  593. DDrawInnerTile(x,y:INTEGER; index:WORD);
  594. EDrawInnerTile(x,y:INTEGER; index:WORD);
  595. DSHORT
  596. ESHORT
  597. Dist diese Routine bereits aktiv?
  598. Eis this routine already active?
  599. D1.Zeile, in der Sp.1 mit Sp.2 ueberlappt
  600. E1st row where sprite1 overlaps sprite2
  601. D1.Zeile, in der Sp.2 mit Sp.1 ueberlappt
  602. E1st row where sprite2 overlaps sprite1
  603. D- gleichzeitige Darstellung von bis zu 500 Sprites
  604. E- up to 500 sprites may be simultaneously active
  605. DStandardpalette setzen, sicher ist sicher
  606. Eset default palette, just to be sure!
  607. D15, d.h.: weiss (dto.)
  608. E15, that is: white (dto.)
  609. DLB der neuen Startadresse setzen
  610. Eset LB of new starting address
  611. DHB der neuen Startadresse setzen
  612. Eset HB of new starting address
  613. Dauf naechste Zeile positionieren:
  614. Eposition at next row:
  615. DQuellzeiger weitersetzen
  616. Eincrease source pointer
  617. Drueckwaerts moven!
  618. Emove backwards!
  619. DQuelldaten
  620. Esource data
  621. Dzu minmieren)
  622. Eminimize the squared error)
  623. DOutput-Register befragen:
  624. Euse output register:
  625. DMuster zugewiesen
  626. Epattern
  627. Dzu minimieren)
  628. Eminimize the square of errors!)
  629. Dnur falls x mod 4=0 _und_ rightcut mod 4=0 ist koennen
  630. Eonly if x mod 4=0 _and_ rightcut mod 4=0, then we can
  631. DNun folgen die Codestuecke, die Verwendung finden, um ein Sprite auf den
  632. ENow, all the code pieces follow, which can be used to display a sprite;
  633. Dzur (Offset-)Quelladresse in Page 3 addieren
  634. Esource addr. in page 3 for each cut off top-row
  635. DZunaechst den Spriteheader einlesen:
  636. Efirst, read in the sprite header:
  637. Dzuerst das Hintergrundbild auf die aktuelle Seite kopieren:
  638. Efirst copy the background picture to the actual graphic page:
  639. Dzu zeichnende Zeilenzahl nach BX retten
  640. Esave number of rows to draw into BX
  641. DQuell- und Zieladresse nicht mehr retten
  642. Edon't save source- and destination addresses
  643. DQuell- und Zieladresse fuer weitere Planes retten
  644. Esave source- and destination address for other planes
  645. DQuellzeiger um 1 Grafikzeile weitersetzen
  646. Eincrement source pointer by 1 graphic row
  647. DPunkt setzen
  648. Edraw point
  649. Dnur falls x mod 4=0 ist koennen wir WriteMode1 verwenden
  650. Eonly if x mod 4=0 is it possible to use WriteMode1
  651. Dnur falls leftcut mod 4=0 ist koennen wir WriteMode1 verwenden
  652. Eonly if leftcut mod 4=0 is it possible to use WriteMode1
  653. Dnun fuer diese Farbe eine moeglichst gute Naeherung finden:
  654. Enow find the best fit for that color:
  655. DNun eigentliches Clipping vornehmen:
  656. ENow do the clipping itself:
  657. Dfuer Stringbefehle die Zieladresse nach DI bringen
  658. Eput dest. addr. into DI for 8086's string instructions
  659. Dzu zeichnende Zeilen
  660. Erows to draw
  661. DAusschnitt auf Bildschirm zurechtklippen:
  662. Ecut clipping according to visible screen:
  663. Dmuss zwischen 0 und 15 liegen, 16 ist verboten
  664. Emust lie in the range 0..15, 16 is not allowed
  665. DAusserdem muessen die einzelnen Routinen zur Unterscheidbarkeit in
  666. EBesides that, for distinguishtability, the routines must be pair-
  667. Dfuer gruen
  668. Efor green
  669. DQuell-/Zieldaten beide mit nur 1 Indexregister ansprechen
  670. Eaddress source and destination with only 1 index register
  671. DZugriff auf Leseplane vorbereiten:
  672. Eprepare access to read plane:
  673. D...und Zugriff auf alle 4 Bitmaps erlauben
  674. E...and allow access to all 4 bit maps
  675. Deine andere Routine zur Darstellung des Sprites als die gerade ak-
  676. Emomentary active sprite display method is needed; if so, then copy
  677. DoffsetYPix
  678. EoffsetYPix
  679. DoffsetXPix
  680. EoffsetXPix
  681. D24..25 DW ?            ; yoffset_       | hit2yfirst
  682. E24..25 DW ?            ; yoffset_       | hit2yfirst
  683. DStartkoordinaten des auszugebenden Textes
  684. Estarting coordinates for the text
  685. DSpriteN[] =
  686. ESpriteN[] =
  687. DSpriteN[]
  688. ESpriteN[]
  689. DSpriteN
  690. ESpriteN
  691. DXOR BX,BX    ;von Farbe 0 an
  692. EXOR BX,BX    ;start with color 0
  693. DMOV CX,100h  ;alle 256 Farben
  694. EMOV CX,100h  ;all 256 colors
  695. D16
  696. E16
  697. D#6
  698. E#6
  699. D16.
  700. E16.
  701. DTileNr= Nummer der zu plazierenden Kachel
  702. ETileNr= number of the tile to be placed
  703. Dvirtuelle Koordinate, an die die Kachel plaziert werden soll
  704. Evirtual coordinates where the tile shall be placed
  705. DDie Routine ist nur fuer den Hintergrundmodus STATIC sinnvoll
  706. EUsing the routine only makes sense when using background mode STATIC
  707. Dgesetzter Modus STATIC/SCROLLING
  708. Eset mode, STATIC/SCROLLING
  709. Dgewuenschter Hintergrundmodus STATIC oder SCROLLING
  710. Ewanted background mode, STATIC or SCROLLING
  711. D@akt_SpriteX
  712. E@akt_SpriteX
  713. D[@akt_SpriteX+1]   = SpriteX
  714. E[@akt_SpriteX+1]   = SpriteX
  715. DDI=endx:=sprite[WORD PTR sprite[R]+
  716. EDI=endx:=sprite[WORD PTR sprite[R]+
  717. D(AX=)[yoffset_]     = yoffset
  718. E(AX=)[yoffset_]     = yoffset
  719. DGNDPAGE, wenn der Hintergrundmodus STATIC benutzt wird), es
  720. EGNDPAGE, if you are using background mode STATIC), however,
  721. Dxt
  722. Ext
  723. DBildausschnitt nicht auf dem Bildschirm
  724. Ewindow is offscreen
  725. D(Dummywert)  CX:=breite1+breite2
  726. E(dummy value) CX:=breite1+breite2
  727. D38..39 DB 'K','R'      ; Kennung als Sprite
  728. E38..39 DB 'K','R'      ; tag used for sprites
  729. Daktuell sichtbare Seite
  730. Eactually visible page
  731. Dskip_zeile
  732. Eskip_zeile
  733. Daktuelle Grafikseite
  734. Eactual graphic page
  735. Dskip_sprite
  736. Eskip_sprite
  737. Daktuelle Farbpalette
  738. Eactual color palette
  739. D²),
  740. E²),
  741. D²+
  742. E²+
  743. D.:
  744. E.:
  745. D[@
  746. E[@
  747. D=[
  748. E=[
  749. D->
  750. E->
  751. Dz
  752. Ez
  753. Dy
  754. Ey
  755. Dx
  756. Ex
  757. Dw
  758. Ew
  759. Dv
  760. Ev
  761. Du
  762. Eu
  763. Dt
  764. Et
  765. Dr
  766. Er
  767. Dq
  768. Eq
  769. Do
  770. Eo
  771. Dn
  772. En
  773. Dm
  774. Em
  775. Dl
  776. El
  777. Dk
  778. Ek
  779. Dj
  780. Ej
  781. Di
  782. Ei
  783. Dh
  784. Eh
  785. Dg
  786. Eg
  787. Df
  788. Ef
  789. De
  790. Ee
  791. Dd
  792. Ed
  793. Dc
  794. Ec
  795. Db
  796. Eb
  797. Da
  798. Ea
  799. DS
  800. ES
  801. DP
  802. EP
  803. D= ((
  804. E= ((
  805. D) )
  806. E) )
  807. D-(
  808. E-(
  809. D] =
  810. E] =
  811. D=[@
  812. E=[@
  813. D!!!
  814. E!!!
  815. D!)
  816. E!)
  817. D)=
  818. E)=
  819. D!:
  820. E!:
  821. D>=
  822. E>=
  823. D<=
  824. E<=
  825. D(=
  826. E(=
  827. D, <=
  828. E, <=
  829. D:= $
  830. E:= $
  831. DZ
  832. EZ
  833. DY
  834. EY
  835. DW
  836. EW
  837. DV
  838. EV
  839. DU
  840. EU
  841. DT
  842. ET
  843. DR
  844. ER
  845. DQ
  846. EQ
  847. DO
  848. EO
  849. DN
  850. EN
  851. DL
  852. EL
  853. DK
  854. EK
  855. DJ
  856. EJ
  857. DI
  858. EI
  859. DH
  860. EH
  861. DG
  862. EG
  863. DF
  864. EF
  865. DE
  866. EE
  867. DD
  868. ED
  869. DC
  870. EC
  871. DB
  872. EB
  873. D9
  874. E9
  875. D8
  876. E8
  877. D7
  878. E7
  879. D6
  880. E6
  881. D5
  882. E5
  883. D4
  884. E4
  885. D3
  886. E3
  887. D2
  888. E2
  889. D1
  890. E1
  891. D0
  892. E0
  893. D"
  894. E"
  895. D!
  896. E!
  897. D.
  898. E.
  899. D,
  900. E,
  901. D
  902. E
  903. D~
  904. E~
  905. D}
  906. E}
  907. D|
  908. E|
  909. D{
  910. E{
  911. D`
  912. E`
  913. D_
  914. E_
  915. D^
  916. E^
  917. D]
  918. E]
  919. D\
  920. E\
  921. D[
  922. E[
  923. D?
  924. E?
  925. D>
  926. E>
  927. D=
  928. E=
  929. D<
  930. E<
  931. D;
  932. E;
  933. D:
  934. E:
  935. D/
  936. E/
  937. D...
  938. E...
  939. D--------------------------------------------------------------------------
  940. E--------------------------------------------------------------------------
  941. D-----------------------------------------------------
  942. E-----------------------------------------------------
  943. D---------------------------------
  944. E---------------------------------
  945. D---
  946. E---
  947. D-
  948. E-
  949. D+
  950. E+
  951. D*
  952. E*
  953. D)
  954. E)
  955. D(
  956. E(
  957. D'
  958. E'
  959. D&
  960. E&
  961. D%
  962. E%
  963. D#
  964. E#
  965. DM
  966. EM
  967. D:=+
  968. E:=+
  969. D)  (=
  970. E)  (=
  971. D)...
  972. E)...
  973. D= -
  974. E= -
  975. D<>
  976. E<>
  977. DX
  978. EX
  979. D=(
  980. E=(
  981. D, "+
  982. E, "+
  983. D:=(
  984. E:=(
  985. D9.
  986. E9.
  987. D8.
  988. E8.
  989. D7.
  990. E7.
  991. D6.
  992. E6.
  993. D5.
  994. E5.
  995. D4.
  996. E4.
  997. D3.
  998. E3.
  999. D2.
  1000. E2.
  1001. D1.
  1002. E1.
  1003. D= ^
  1004. E= ^
  1005. Ds
  1006. Es
  1007. D:=-
  1008. E:=-
  1009. D)*
  1010. E)*
  1011. D+(
  1012. E+(
  1013. D:=
  1014. E:=
  1015. Dp
  1016. Ep
  1017. D@
  1018. E@
  1019. DA
  1020. EA
  1021. D],
  1022. E],
  1023. D=^
  1024. E=^
  1025. D[]
  1026. E[]
  1027. D].
  1028. E].
  1029. D46..47 DW obere_Begrenzungen
  1030. E46..47 DW offset_ptr_to_top_boundary_data
  1031. Dwir WriteMode1 verwenden!
  1032. Euse write mode 1!
  1033. Dtive benoetigt wird und wenn ja, diese in Position bringen!
  1034. Ein the right one!
  1035. DTilezeile nicht gesondert gezeichnet werden
  1036. Eneed to be drawn separately
  1037. DDiese Ueberpruefung geschieht punktgenau und ist unabhaengig davon,
  1038. EThis check is pixel-precise and doesn't depend on the sprites being
  1039. DDie Routine erkennt automatisch, ob es sich bei dem File um ein ein-
  1040. EThe routine automatically detects whether the specified file con-
  1041. Dmin) und diese Farbe (in p) merken
  1042. E(in min) and that color (in p)
  1043. Dhier "statisch" aufgenommen!
  1044. Ethus, here they were defined "static"
  1045. Deigentlichen Spritedaten ignoriert und stattdessen die Hintergrunddaten
  1046. Ewill be ignored; instead, the background data underneath the sprite's
  1047. Dtine VOR dem Aufruf von ANIMATE auszufuehren, so dass evtl. Aenderungen
  1048. Ecall this routine BEFORE calling ANIMATE. That way, evtl. changes to
  1049. Dlich ausserhalb des sichtbaren Bereichs), so wird NIL zurueckgegeben!
  1050. Eroutine will return NIL!
  1051. DDie Linie wird NICHT automatisch in den Hintergrund uebernommen,
  1052. EThe line will NOT automatically be taken over into the background
  1053. Dmit Farbtabelle umsetzen
  1054. Euse color lookup table to transform
  1055. Dy in absolute Koordinaten umrechnen
  1056. Etransform y into absolue coordinates
  1057. Dx in absolute Koordinaten umrechnen
  1058. Etransform x into absolute coordinates
  1059. Dvirtuelle = absolute Koordinaten
  1060. Evirtual = absolute coordinates
  1061. Dvirtuelle -> absolute Koordinaten
  1062. Evirtual -> absolute coordinates
  1063. DTilezaehler in X-Richtung erhoehen
  1064. Eincrement tile counter in X-direction
  1065. DTileindex bestimmen:
  1066. Edetermine tile index:
  1067. Drightcut nach AH retten
  1068. Esave rightcut to AH
  1069. Drichtige Bitplane anwaehlen
  1070. Eselect correct bitplane
  1071. DTile wurde unten entsprechend geschnitten
  1072. Etile has been clipped at its bottom accordingly
  1073. DTile wurde rechts und unten entsprechend geschnitten
  1074. Etile has been clipped at its right and bottom accordingly
  1075. DTile wurde rechts und oben entsprechend geschnitten
  1076. Etile has been clipped at its right and top accordingly
  1077. DTile wurde rechts entsprechend geschnitten
  1078. Etile has been clipped at its right accordingly
  1079. DTile wurde links und unten entsprechend geschnitten
  1080. Etile has been clipped at its left and bottom accordingly
  1081. DTile wurde links und oben entsprechend geschnitten
  1082. Etile has been clipped at its left and top accordingly
  1083. DTile wurde links entsprechend geschnitten
  1084. Etile has been clipped at its left accordingly
  1085. DTile muss links, rechts (und unten) ganz auf dem Bildschirm sein
  1086. ETile must be onscreen with its left, right (and lower) parts
  1087. DDie Bitmap-Grafik in der Datei "name" wurde in die Seite "pa" geladen
  1088. EThe bitmap-picture in file "name" has been loaded into page "pa"
  1089. Ddieser Wert in Mikrosekunden
  1090. Ethat value in microseconds
  1091. Dmit %1111 anfangen
  1092. Estart with %1111
  1093. DMindestzykluszeit (in Mikrosekunden)
  1094. Estore min. time for 1 cycle (micro-
  1095. Dlinke obere Eck-Tile zeichnen:
  1096. Edraw upper left corner-tile:
  1097. DHintergrundfarbe holen...
  1098. Eget background color...
  1099. DHintergrund zeigen!
  1100. Epoint to background!
  1101. Dmin
  1102. Emin
  1103. Deine Zeile uebertragen
  1104. Emove data of one row
  1105. DDieses Fehlerquadrat in BX speichern
  1106. EStore that square of error in BX
  1107. DDie Grafikseite ist nun fertiggestellt und muss noch angezeigt werden:
  1108. EThe graphic page is now ready to be displayed:
  1109. DBitplane ins Highbyte bringen
  1110. Ebring bitplane to highbyte
  1111. DBitplane fuer Lesezugriff nach AX bringen
  1112. Ebring bitplane for read access to AX
  1113. Dbildschirmstartx retten
  1114. Esave ScreenStartX
  1115. DBildschirmkoordinaten berechnen
  1116. Ecompute screen coordinates
  1117. Dlinke obere Ecke des Zieles (in virtuellen Koordinaten)
  1118. Eupper left corner of destination (virtual coordinates)
  1119. DMindestzeit eines Animationszyklus in Millisekunden
  1120. Emin. time for one animation cycle in milliseconds
  1121. Deinzutragende Kennung fuer Bilderdateien
  1122. Etag for picture file
  1123. DDiese Routine verwendet SpriteLADEnummern!
  1124. EThis routine uses spriteLOADnumbers!
  1125. Dlicutoff_in_Punkten
  1126. Elecutoff_in_points
  1127. DDifferenz im Rotanteil berechnen
  1128. Ecompute difference in red part
  1129. DBit 6:=0: keine Doppelwortadressierung von Daten
  1130. Ebit 6:=0 -> no double word addressing scheme in
  1131. Dgister auswaehlen, den Wert aus dem zugehoerigen
  1132. Ethe CRT-controller port, read out the according
  1133. DBit 2:=1:kein odd/even-Mechan.
  1134. Ebit 2:=1 -> no odd/even-scheme
  1135. DBit 3:=0:4 Planes nicht chainen
  1136. Ebit 3:=0 -> don't chain planes
  1137. DMit BIOS Grafikmodus $13 (=320x200x256) setzen
  1138. Euse BIOS to set graphic mode $13 (320x200x256)
  1139. D1-PAGE = Grafikseite, auf der gezeichnet werden soll
  1140. E1-PAGE = graphic page to be drawn upon
  1141. D- viele unterstuetzende Routinen: zeichnen von Linien (mit eingebautem
  1142. E- several supporting routines to: draw lines (with built in clipping-
  1143. DVerwendete Register: AX und SI
  1144. Eused registers: AX and SI
  1145. D:= $80
  1146. E:= $80
  1147. D15, d.h.: weiss
  1148. E15, that is: white
  1149. Dkleiner Einschub: anhand des Modusbytes des Sprites entscheiden, ob
  1150. ENow: look at sprite's mode byte and determine if an other than the
  1151. DLB-Startadress-Register
  1152. ELB-startaddress-register
  1153. Dfuer andere Raender
  1154. Efor other edges
  1155. Dauch nach [zeilenadr]
  1156. Estore it in [zeilenadr], too
  1157. DQuellzeiger
  1158. Esource pointer
  1159. Dnumber
  1160. Enumber
  1161. Dfuer:
  1162. Efor:
  1163. D- verschiedene Spritedarstellungsmoeglichkeiten:
  1164. E- several sprite display methods available:
  1165. Devtl. Verschiebung korrigieren
  1166. Eevtl. correct displacement
  1167. DoffsetXPix:=leftcut:=StartVirtualX AND $F
  1168. EoffsetXPix:=leftcut:=StartVirtualX AND $F
  1169. DoffsetYPix:=topcut:=StartVirtualY AND $F
  1170. EoffsetYPix:=topcut:=StartVirtualY AND $F
  1171. Daktuelle Ausgaberichtung
  1172. Eactual output direction
  1173. D28..29 DW ?            ;                | ueberlappy_1
  1174. E28..29 DW ?            ;                | ueberlappy_1
  1175. DTRUE/FALSE, falls "GetImage" clippen musste
  1176. ETRUE/FALSE, if "GetImage" had to clip image
  1177. D(x,0) =
  1178. E(x,0) =
  1179. Dshort
  1180. Eshort
  1181. DMOV AX,1017h ;lese Palettenregister
  1182. EMOV AX,1017h ;read palette registers
  1183. Dfuer jede oben abgeschnittene Zeile 4 Bytes
  1184. Eadd 4 bytes to the (offset part of the)
  1185. Dausgelesen werden, wenn der Grafikmodus
  1186. Eread out directly from the VGA card not
  1187. Dausgelesen mithilfe des BIOS-Aufrufs:
  1188. Eread out by using the VGA-BIOS-calls:
  1189. DPunkt1 rechts des Windows?
  1190. Epoint1 right of window?
  1191. DPunkt1 oberhalb des Windows?
  1192. Epoint1 above window?
  1193. DPunkt1 links des Windows?
  1194. Epoint1 left of window?
  1195. DPunkt unterhalb des Windows?
  1196. Epoint below window?
  1197. DNun noch die Kacheln links und/oder rechts entlang des Bildschirmrandes:
  1198. ENow work on the tiles at the left and/or right edge of the screen:
  1199. Dfuer jede Zeile 4 Bytes
  1200. E4 bytes for each row
  1201. DNummer des aufgetretenen Fehlers
  1202. Enumber of the occurred error
  1203. Dwuerde codiert werden als:
  1204. Ewould be coded as:
  1205. Dlicutoff mod 4 gibt an, in welcher Reihenfolge die Punkte aus dem Heap
  1206. Elicutoff mod 4 determines the order in which the points must be read
  1207. DTP Daten
  1208. ETP's data
  1209. DTP's Datensegment wiederherstellen
  1210. Erestore TP's data segment
  1211. DBP = endy, SI=[@max_Breite+1] = max_Breite_in_4er_Gruppen,
  1212. EBP = endy, SI=[@max_Breite+1] = max_width_in_groups of 4,
  1213. D(Planes abwechselnd von oben nach unten lesen!)
  1214. E(read planes top-down, in alternating order!)
  1215. DBP retten
  1216. Esave BP
  1217. DBP nachher wieder poppen!
  1218. Epop BP in the end!
  1219. DBP direkt verwenden
  1220. Euse BP directly
  1221. DBP auf die richtige Groesse bringen
  1222. Eset BP to proper size
  1223. D2.Parameter s2 vom Stack holen
  1224. Eget 2nd parameter s2 from stack
  1225. D1.Parameter s1 vom Stack holen
  1226. Eget 1st parameter s1 from stack
  1227. DBP-Register retten
  1228. Esave BP-register
  1229. DAbweichungsmass steht nun in AX!
  1230. Emeasure of difference is kept in AX
  1231. DDIV
  1232. EDIV
  1233. Dstartx
  1234. Estartx
  1235. D(x1,y1) =
  1236. E(x1,y1) =
  1237. DAlle Bildschirmteile, die ausserhalb des durch SetBackground-
  1238. Eall screen parts, which lie outside the window specified by
  1239. Daufgerundet
  1240. Erounded up
  1241. Dzuerst
  1242. Efirst
  1243. Daus dem File gelesene Farbpalette, evtl. ergaenzt
  1244. Ecolor palette read from the file, evtl. filled up
  1245. Dfuer HB/LB auf selber Seite geschieht:
  1246. Efor HB/LB takes place while displaying the same page:
  1247. Dout: -
  1248. Eout: -
  1249. Dzufuehren, da die gezeichnete Linie sonst sofort wieder verschwindet)
  1250. Ebecause otherwise, the drawn line will vanish at once!)
  1251. Dzufuehren, da der gezeichnete Punkt sonst sofort wieder verschwindet)
  1252. Ebecause otherwise, the drawn point will vanish at once!)
  1253. DNur wenn "was_cut" TRUE ist, sind die Werte der globalen "..._cut"
  1254. EOnly if "was_cut" is set to TRUE, the (global) "..._cut" variables
  1255. Dnutzt aus, dass AX zufaelligerweise gerade 4 ist
  1256. Etake advantage of AX having the value 4!
  1257. Dout:
  1258. Eout:
  1259. DNun werden iterativ die ueberlappenden Zeilen und Spalten exakt geprueft
  1260. ENow check the overlapping rows and columns more closely by iteration:
  1261. DDummywert
  1262. Edummy value
  1263. Dwurden auf die Grafikseite 0 eingestellt
  1264. Ehave been set to graphic page 0
  1265. Dwurde auf STATIC gesetzt
  1266. Ehas been set to STATIC
  1267. Dwurde auf die Hintergrundseite gesetzt
  1268. Ehas been set to the background page
  1269. Daus der Tabelle "ShadowTab" ersetzt.
  1270. Efrom the table "ShadowTab"
  1271. Dnur geladen, nicht gesetzt!
  1272. Epalette will only become loaded, not actually set!
  1273. DJede dieser Routinen MUSS EXAKT 16 Bytes lang und VOLL RELOKATIBEL
  1274. EEvery routine MUST CONSIST OF EXACTLY 16 bytes and BE FULLY RELO-
  1275. DMethode, die fuer Sp momentan gesetzt ist: Display_NORMAL,
  1276. Eactually set display method for sprite Sp: Display_NORMAL,
  1277. D#7
  1278. E#7
  1279. DKopie von x nach BX
  1280. Eplace a copy of x in BX
  1281. Dwobei WindowY2=YMAX
  1282. Ehere, WindowY2=YMAX
  1283. Dwobei WindowX2=XMAX
  1284. Ehere, WindowX2=XMAX
  1285. Dstarty
  1286. Estarty
  1287. D(x2,y2) =
  1288. E(x2,y2) =
  1289. DBloecke
  1290. Eblocks
  1291. Dalle Spritedaten auf den Heap, und zwar derart, dass die Adresse
  1292. Esprite data into the heap, in a way such that the address always
  1293. Dglobale Fehlervariable
  1294. Eglobal error variable
  1295. Delse
  1296. Eelse
  1297. Dflickerfreie Animation durch page-flipping, Auswertung von Retrace-
  1298. Eflickerfree animation by using page-flipping, watching retrace
  1299. Dfuer blau
  1300. Efor blue
  1301. Dsicher ist sicher!
  1302. Ejust to be sure!
  1303. Dhier:
  1304. Ehere:
  1305. Dright_cut,top_cut,bottom_cut = dto., fuer andere Raender
  1306. Eright_cut,top_cut,bottom_cut = dto., for the other boundaries
  1307. D6..7   DW Plane_3_Daten
  1308. E6..7   DW offset_ptr_to_plane3_data
  1309. DDI = starty, BX = SpriteY, DX=[@akt_SpriteX+1] = SpriteX,
  1310. EDI = starty, BX = SpriteY, DX=[@akt_SpriteX+1] = SpriteX,
  1311. D- Sprites koennen pixelweise als durchsichtig gegenueber dem Hintergrund
  1312. E- sprites can be declared to be transparent with regard to the background
  1313. DES:BX = (Zeiger auf Zieladresses) zu bringen sind;
  1314. EES:BX = (pointer to destination address)
  1315. DBytes_je_Plane3_Zeile
  1316. Ebytes_per_plane3_row
  1317. DBytes_je_Plane2_Zeile
  1318. Ebytes_per_plane2_row
  1319. DBytes_je_Plane1_Zeile
  1320. Ebytes_per_plane1_row
  1321. DBytes_je_Plane0_Zeile
  1322. Ebytes_per_plane0_row
  1323. DCycleTime
  1324. ECycleTime
  1325. D16 Punkte = 4 Bytes
  1326. E16 pixels = 4 bytes
  1327. Dmitgetauscht werden muss!
  1328. Eto accomplish that!
  1329. Deigentlich: (x MOD XTiles)
  1330. Eto be exact: (x MOD XTiles)
  1331. Deinen Spritezyklus
  1332. Ethey make up a sprite cycle
  1333. DDisplay_FAST, Display_SHADOW bzw. Display_UNKNOWN, wenn das
  1334. EDisplay_FAST, Display_SHADOW or Display_UNKNOWN, if the
  1335. DDie Bitmaske fuer den richtigen Schreibe-Planezugriff wurde bereits
  1336. EThe proper bitmask for selecting the correct write plane has al-
  1337. Dtiles
  1338. Etiles
  1339. Dlinke obere Ecke des zu sichernden Bildausschnittes
  1340. Eupper left corner of the area which shall be stored
  1341. Dsignalen und Verwendung eines speziellen VGA-256-Farbengrafikmodus
  1342. Esignals and usage of a special 256 color mode of the VGA
  1343. DNextSprite[SpriteN[?]]
  1344. ENextSprite[SpriteN[?]]
  1345. Dmax_Breite_in_4er_
  1346. Emax_width_in_groups_of_4
  1347. DCL
  1348. ECL
  1349. DBL
  1350. EBL
  1351. DAL
  1352. EAL
  1353. DPAGESIZE
  1354. EPAGESIZE
  1355. DPAGE
  1356. EPAGE
  1357. DBACKGROUNDMODE
  1358. EBACKGROUNDMODE
  1359. DBACKGNDPAGE
  1360. EBACKGNDPAGE
  1361. DFALSE
  1362. EFALSE
  1363. Dx:=((x AND $FFF0)-BackX1) DIV 16 (nicht SHR 4)!
  1364. Ex:=((x AND $FFF0)-BackX1) DIV 16 (not: SHR 4)!
  1365. DAND
  1366. EAND
  1367. DDS = ^Spritedaten, ES = ^Grafikseite
  1368. EDS = ^sprite data, ES = ^graphic page
  1369. D(Segment-)Zieladresse ist aktive Grafikseite
  1370. E(segment part of) dest. address is active page
  1371. DES:=Segment_Adr[1-PAGE], denn 1-PAGE=sichtbare Seite
  1372. EES:=Segment_Adr[1-PAGE], because 1-PAGE=visible page
  1373. DES:DX:=y2un[Spalte]
  1374. EES:DX:=y2un[column]
  1375. DES:DX:=x2re[Zeile]
  1376. EES:DX:=x2re[row]
  1377. DES:DX:=x2li[Zeile]
  1378. EES:DX:=x2li[row]
  1379. DDS:CX:=y1un[Spalte]
  1380. EDS:CX:=y1un[column]
  1381. DDS:CX:=x1re[Zeile]
  1382. EDS:CX:=x1re[row]
  1383. DDS:AX:=x1li[Zeile]
  1384. EDS:AX:=x1li[row]
  1385. DIF PAGE=0 THEN PAGE:=1 ELSE (PAGE=1) PAGE:=0
  1386. EIF PAGE=0 THEN PAGE:=1 ELSE (PAGE=1) PAGE:=0
  1387. DPlane1
  1388. EPlane1
  1389. Dwird von TP wiederhergestellt
  1390. Ewill be restored by TP automatically
  1391. Drigh_cut
  1392. Eright_cut
  1393. Ddirekt
  1394. Edirectly
  1395. DTile muss ganz auf dem Bildschirm sein, es findet
  1396. Etile must be completely onscreen, there will be
  1397. DHier gilt: die beiden Punkte wurden auf den sichtbaren Bereich zurecht-
  1398. Eprecondition here: both points have been clipped to the visible window;
  1399. Deiner Weitersetzung um 4 Bildpunkte entspricht
  1400. Ecorresponds to an ajustment of 4 points
  1401. Ddie letzte Hex-Ziffer $0 ist!
  1402. Elast hex-digit is $0!
  1403. DBitplane 3 zu Bitplane 0 muss dabei die Start-
  1404. Efrom bitplane 3 to bitplane 0, then the start-
  1405. Dbis rechte obere Ecke erreicht
  1406. Euntil upper right corner has been reached
  1407. Dgilt wg. TimeFlag:=$80 die Zeitbedingung noch nicht!
  1408. Efor the very first animation cycle, yet!
  1409. Dfindet jedoch keine Ueberpruefung statt!
  1410. Ethe routine doesn't check that!
  1411. Dwird beim Verlassen der Prozedur gebraucht!
  1412. Ewill be needed when leaving the procedure!
  1413. DDie Grafik der Hintergrundseite wurde in der Datei "name" abgelegt
  1414. EThe picture of the background page has been stored as file "name"
  1415. DDie Grafik auf Seite "pa" wurde in der Datei "name" als Bitmap abgelegt
  1416. EThe picture at page "pa" has been stored (as bitmap) to file "name"
  1417. DTile wurde auf aktueller Seite PAGEADR gezeichnet
  1418. Etile has been drawn on actual page PAGEADR
  1419. DTile wurde auf aktueller Seite PAGEADR bei (0,0) gezeichnet
  1420. Etile has been drawn at (0,0) on the actual page PAGEADR
  1421. DDie Grafikseite BACKGNDPAGE wurde mit der Farbe "Color" gefuellt
  1422. EThe graphic page BACKGNDPAGE has been filled with color "Color"
  1423. Ddirekt zu @LineReady verzweigt!
  1424. E@LineReady, instead!
  1425. Drightcut
  1426. Erightcut
  1427. DDie Routinen koennen sicher sein, dass CX<>0 ist
  1428. EThe routines can rely upon CX being <>0
  1429. Dhit2yfirst
  1430. Ehit2yfirst
  1431. Dhit2xfirst
  1432. Ehit2xfirst
  1433. Dhit1yfirst
  1434. Ehit1yfirst
  1435. Dhit1xfirst
  1436. Ehit1xfirst
  1437. Dwird ueber Stack adressiert!
  1438. Ewill be addressed via SS!
  1439. Dbisher gefundenes minimales Fehlerquadrat
  1440. Emin. square of error (up to now)
  1441. DDiff ≈±2^6 -> Quadrat ≈±2^12 -> 3*Quadrat<MaxInt
  1442. EDiff ≈±2^6 -> square ≈±2^12 -> 3*square<MaxInt
  1443. DBP:=16+3-rightcut, denn die Zahl der Bytes je Zeile fuer
  1444. EBP:=16+3-rightcut, because the number of bytes per row
  1445. DBP:=16+3-leftcut, denn die Zahl der Bytes je Zeile fuer
  1446. EBP:=16+3-leftcut, because the number of bytes per row
  1447. D(virtuelle) Startkoordinaten des auszugebenden Textes
  1448. E(virtual) starting coordinates for the text to be written
  1449. Dbringen, AUF KEINEN FALL AUFRUFEN!!!
  1450. EDO NOT TRY TO CALL THIS "PROCEDURE"!!!
  1451. Daktuelle Grafikseite(nadresse),auf der gezeichnet werden soll
  1452. Eactual graphicpage(address) on which to draw upon
  1453. Daktuelle X-Koord. auch weitersetzen: x:=x+16
  1454. Eincrement actual X-coordinate, too: x:=x+16
  1455. Dalle Spalten durch?
  1456. Eall columns done?
  1457. Dalle Zeilen durch?
  1458. Eall rows done?
  1459. Dalle Bytes durch?
  1460. Eall bytes done?
  1461. D(Farbe 0 ignorieren, da "durchsichtig")
  1462. E (ignore color 0 as "transparent")
  1463. Dalso kein Overflow moeglich
  1464. Eso no overflow is possible
  1465. DPlane i berechnet sich zu (16+3-i-rightcut) SHR 2
  1466. Eof plane i is computed by (16+3-i-rightcut) SHR 2
  1467. DPlane i berechnet sich zu (16+3-i-leftcut) SHR 2
  1468. Eof plane i is computed by (16+3-i-leftcut) SHR 2
  1469. DPlane2
  1470. EPlane2
  1471. D=yt*XTiles+(xt-1)
  1472. E=yt*XTiles+(xt-1)
  1473. DBytes_zu_moven fuer i=1
  1474. Ebytes_to_move for i=1
  1475. Dum wieviel Punkte der Ausschnitt links ausserhalb des Bild-
  1476. Ehow many pixels at the left edge of the image lie outside
  1477. Dtionszyklus (dann aber permanent) (Deshalb ist es sinnvoll, diese Rou-
  1478. Eplace (but then, it remains permanent) (For that reason, you should
  1479. DSCROLLADR wurde auf die scrollbare Hintergrundseite gesetzt
  1480. ESCROLLADR has been set to the scrollable background page
  1481. Dja
  1482. Eyes
  1483. Dpa
  1484. Epa
  1485. DSpriteX
  1486. ESpriteX
  1487. Dalso number+i
  1488. Eis, number+i
  1489. DPlane3
  1490. EPlane3
  1491. D     SpriteN[s1],SpriteX[s1],SpriteY[s1] = Spritedaten von Sprite s1
  1492. ESpriteN[s1],SpriteX[s1],SprizeY[s1] = sprite data of sprite s1
  1493. DES:BX=Zeiger auf TimeFlag, Bit 7=0/1
  1494. EES:BX=pointer to TimeFlag, bit 7=0/1
  1495. Dim CRT-Controller das underline-location-Re-
  1496. Eaddress the underline-location-register at
  1497. DBP=16+3-leftcut
  1498. EBP=16+3-leftcut
  1499. DBP=16+3-rightcut
  1500. EBP=16+3-rightcut
  1501. D; jetzt fuer temporaere Variablen reservierter
  1502. E; now follows the scratch area reserved for temporary
  1503. Dof ASM
  1504. Eof ASM
  1505. D48..49 DW untere_Begrenzungen
  1506. E48..49 DW offset_ptr_to_bottom_boundary_data
  1507. DOktanden berechnen
  1508. Ecompute octant
  1509. D#8
  1510. E#8
  1511. Daktuelle Textausgabefarben
  1512. Eactual text color
  1513. Daktuelle Schreibplane waehlen
  1514. Echoose plane to write at
  1515. Daktuelle Schreibplane merken
  1516. Esave actual write plane
  1517. Daktuelle Leseplane waehlen
  1518. Echoose plane from which to read
  1519. Daktuelle Leseplane 0 waehlen
  1520. Echoose plane 0 for reading
  1521. DSpriteX[],SpriteY[] =
  1522. ESpriteX[],SpriteY[] =
  1523. DSpriteY
  1524. ESpriteY
  1525. D- Spritebewegung pixelweise (und nicht nur byteweise) moeglich
  1526. E- sprite movement in any pixel-increments you want
  1527. DDS:SI = (Zeiger auf Quelladresse) nach...
  1528. EDS:SI = (pointer to source address) to...
  1529. DPlane4
  1530. EPlane4
  1531. D+(licutoff_in_Punkten+i) DIV 4
  1532. E+(lecutoff_in_points+i) DIV 4
  1533. D+(licutoff_in_Punkten+1) DIV 4
  1534. E+(lecutoff_in_points+1) DIV 4
  1535. D     SpriteN[s2],SpriteX[s2],SpriteY[s2] = Spritedaten von Sprite s2
  1536. ESpriteN[s2],SpriteX[s2],SpriteY[s2] = sprite data of sprite s2
  1537. D[@Starty_2+1]    = starty*2
  1538. E[@Starty_2+1]    = starty*2
  1539. DSTATIC/SCROLLING fuer festen/scrollbaren Hintergrund
  1540. ESTATIC/SCROLLING for solid/scrollable background
  1541. DDieser Modus ist verschieden vom Modus $13 der VGA!!!
  1542. EThis mode is different from mode $13 of the VGA-BIOS!!!
  1543. Dalle Sprites, zerlegt diese in Tiles und legt sie in der 4.Grafik-
  1544. Esprites, splits them into tiles and stores them into the 4th graphic
  1545. D012A: STOSW
  1546. E012A: STOSW
  1547. DFuellfarbe fuer die Hintergrundseite BACKGNDPAGE
  1548. Ecolor for filling the background page BACKGNDPAGE
  1549. DMOD
  1550. EMOD
  1551. Dhier: BP=max(x1last,x2last)  (=maxx)
  1552. Ehere: BP=max(x1last,x2last)  (=maxx)
  1553. Dhier: SI=min(x1,x2)  (=minx)
  1554. Ehere: SI=min(x1,x2)  (=minx)
  1555. Dminx
  1556. Eminx
  1557. Dbildschirmstartx
  1558. EScreenStartX
  1559. D[@max_Breite+1] =
  1560. E[@max_Breite+1] =
  1561. D[@max_Breite+1]
  1562. E[@max_Breite+1]
  1563. Drand
  1564. Erand
  1565. DVar., die durch "GetImage" gesetzt werden und
  1566. Evariables set by "GetImage"; if "was_cut" has
  1567. DFarben gewuenscht sind!
  1568. Edarker colors only!
  1569. Dfalls Ausschnitt ueber rechten Bildschirmrand
  1570. Eif image would spread over the right screen
  1571. DDatei existiert nicht oder nicht unter diesem Pfad
  1572. EFile doesn't exist or at least not with that path
  1573. D(Deshalb ist es sinnvoll, diese Routine NACH Aufruf von ANIMATE aus-
  1574. E(For that reason, you should call this routine AFTER calling ANIMATE
  1575. DAlgorithmus der dafuer benutzt werden soll
  1576. Ealgorithm which shall be used
  1577. Dalter Grafikmodus, auf den zurueckgeschaltet werden soll
  1578. Eold graphic mode you want to be switched back at
  1579. D013B: IN     AL,DX
  1580. E013B: IN     AL,DX
  1581. D013A: INC    DX
  1582. E013A: INC    DX
  1583. D0118: INC    DX
  1584. E0118: INC    DX
  1585. Dhier: AX=max(y1last,y2last)  (=maxy)
  1586. Ehere: AX=max(y1last,y2last)  (=maxy)
  1587. Dminy
  1588. Eminy
  1589. Dnaechste
  1590. Enext
  1591. Dnaechste Zeile
  1592. Enext row
  1593. Dnach letzter Grafikzeile
  1594. Eto last graphic row
  1595. D(z.B.: Pixel (1,5,9,...),(2,6,10,...),(3,7,11,...)
  1596. E(e.g.: pixels (1,5,9,...),(2,6,10,...),(3,7,11,...)
  1597. DBackgroundmode
  1598. EBackgroundmode
  1599. Dnaechstes Byte
  1600. Ework on next byte
  1601. Dhalb des Bildes (also zurueckgegebener Zeiger=NIL), dann liefert die
  1602. E_completely_ offscreen (this means: returned ptr=NIL), then the
  1603. DDa als Hintergrundseite BACKGNDADR verwendet wird, ist die
  1604. EBecause BACKGNDADR is used as background page, calling
  1605. DPage-Wert *2 (da Worteintraege!)
  1606. Epage value *2 (word-sized entries!)
  1607. Dnaechste Zeile (-> Word-Werte!)
  1608. Enext row (-> word-sized values!)
  1609. Dnaechste Schreibplane:
  1610. Enext write plane:
  1611. Dnaechste Leseplane:
  1612. Enext read plane:
  1613. Dmax_Breite
  1614. Emax_Breite
  1615. Dname
  1616. Ename
  1617. DDass BP "3 zu gross ist" stoert nicht, da dieser Code nur ausge-
  1618. EBP being "3 units to big" doesn't matter, because this code will
  1619. Dnaechste Farbe
  1620. Enext color
  1621. DZahl der bisher eingelesenen Paletteneintraege
  1622. Enumber of palette entries read in til now
  1623. Dund
  1624. Eand
  1625. DAnimate loescht den Inhalt der alten Grafik (mithilfe der Hintergrund-
  1626. EAnimate erases the old contents of the page (using the background page
  1627. Dansonsten: Treffer in X-Ri., jetzt noch Y-Ri. pruefen (analog zu oben) und
  1628. Eotherwise: collision in X-direction, now check Y-dir. also (as above) and
  1629. DInaktive Sprites (SpriteN[s?]=0) koennen nicht miteinander kollid.
  1630. Einactive sprites (SpriteN[s?]=0) cannot collide
  1631. Dkleine Pseudoprozedur, um die Umsetztabelle fuer die Bitmaske auch im
  1632. ESmall pseudo-procedure to store lookup table for the bitmasks into
  1633. Dplayenable-Signal und schaltet dann auf die so fertiggestellte Seite um
  1634. Eenable signal and switches the display to that now completed page
  1635. Dnur noetig fuer Compilerschalter G+!
  1636. Eonly necessary for compiler switch G+!
  1637. Dhier: SI (DI) = Zeiger auf 1. (2.) Sprite in ?WRTD[..] ,
  1638. Ehere: SI (DI) = pointer to 1. (2.) sprite in ?YWRTD[..],
  1639. DAnzahl Kreise
  1640. Enumber of circles
  1641. DAnzahl Bildschirmpunkte
  1642. Enumber of screen pixels
  1643. DAnzahl Aufrufe der Verzoegerungsschleife
  1644. Enumber of executions of the delay loop
  1645. Dung zurueckgeben, da nur dunklere
  1646. Edifference, as we are looking for
  1647. Dund (0,4,8,...); letztere Bitplane wird um 1 Byte
  1648. Eand (0,4,8,...); the last bitplane needs a cor-
  1649. Din der Farbe COLOR gezeichnet; die Routine fuehrt dabei selber die
  1650. Eusing the color COLOR; the routine will take care of transforming
  1651. DAnzahl zu sichernde Bytes je Zeile
  1652. Enumber of bytes to store for each row
  1653. Duntere
  1654. Elower
  1655. Ddabei ist WindowX1 = 0
  1656. Ehere, WindowX1 = 0
  1657. Dkarte von: Kai Rohrbacher, 1988-1991, Turbo-Pascal 6.0
  1658. Ecard by: Kai Rohrbacher, 1988-1991, Turbo-Pascal 6.0
  1659. Dnoch genug Platz da?
  1660. Eenough space left?
  1661. D8..9   DW Breite (in 4er-Gruppen)
  1662. E8..9   DW width (in groups of 4)     (in German: "Breite")
  1663. Dstartx:=sprite[WORD PTR sprite[L]+
  1664. Estartx:=sprite[WORD PTR sprite[L]+
  1665. Dalten Schirminhalt nach links schieben:
  1666. Escroll old screen contents to the left:
  1667. Dalten Schirminhalt nach rechts schieben:
  1668. Escroll old screen contents to the right:
  1669. Dalle noch relevanten Register retten
  1670. Esave all registers needed later
  1671. Dalten Inhalt nach oben rollen:
  1672. Escroll old contents upwards:
  1673. Dalle 4 Planes gleichzeitig ansprechen
  1674. Eaccess all 4 planes at once
  1675. Dals Zielindex verwendet werden kann
  1676. Eused for accessing the target address
  1677. Dals Schreibplane anwaehlen
  1678. Euse it as write plane
  1679. Dals neue SpriteN[?] uebernehmen
  1680. Euse it as new SpriteN[?] value
  1681. DPlane auswaehlen
  1682. Echoose plane
  1683. DPlane anwaehlen
  1684. Eselect plane
  1685. DFlag zuruecksetzen
  1686. Ereset Flag
  1687. Dalten Lese-/Schreibmodus setzen
  1688. Erestore old read-/write mode
  1689. Dalten Lese-/Schreibmodus merken
  1690. Esave old read-/write mode
  1691. Dals Ergebnis 1 = TRUE zurueckgeben
  1692. Ereturn 1 = TRUE as result
  1693. Dals Ergebnis 0 = FALSE zurueckgeben
  1694. Ereturn 0 = FALSE as result
  1695. Dalle 4 Planes gleichzeitig beschreiben
  1696. Ewrite to all 4 planes simultaneously
  1697. Dalle 4 Planes gleichzeitig bearbeiten
  1698. Ework on all 4 planes simultaneously
  1699. Dalle 256 Default-Farben durchsehen
  1700. Ewalk through all 256 default colors
  1701. Dalten Inhalt von BP wiederherstellen
  1702. Erestore old contents of BP register
  1703. Dplanes) auf 0 setzen
  1704. Ebitplanes) to 0
  1705. DAlles ging gut: Palette zurueckgeben
  1706. Eeverything went alright: return palette
  1707. D0129: REPNZ
  1708. E0129: REPNZ
  1709. Dum 1 erhoehen MOD 4
  1710. Eincrement by 1 MOD 4
  1711. DSinnvoll ist eigentlich nur pa=BACKGNDPAGE
  1712. Emost often, you will use pa=BACKGNDPAGE
  1713. Dbis zum naechsten Animationszyklus (= Aufruf von ANIMATE)
  1714. Eonly until the next animation cycle (=till calling ANIMATE)
  1715. DEin Sprite kann nicht mit sich selbst kollidieren (s1=s2 -> FALSE)
  1716. EA sprite can't collide with itself, (thus:  s1=s2 -> FALSE)
  1717. DDa als Hintergrundseite BACKGNDADR verwendet wird, ist die Verwendung
  1718. EBecause BACKGNDPAGE is used as background page, calling this
  1719. DFarbe 0 ist auch fuer Schatten durchsichtig
  1720. Ecolor 0 is transparent for shadows, too
  1721. DBH=0 -> BX=Zeichenseite
  1722. EBH=0 -> BX=drawing page
  1723. DBH=0 -> BX = Grafikseite
  1724. EBH=0 -> BX = graphic page
  1725. DAnzahl der aus dem File gelesenen Tiles (0 = Fehler trat auf)
  1726. Enumber of the tiles read in from the file (0 = error occured)
  1727. DAnzahl der aus dem File gelesenen Sprites (0 = Fehler trat auf)
  1728. Enumber of the sprites read in from the file (0 = error occured)
  1729. DBackX1
  1730. EBackX1
  1731. DBackY1
  1732. EBackY1
  1733. Dja, neue Koordinaten berechnen: y1:=y1+(y2-y1)/(x2-x1)*(WindowX1-X1)
  1734. Eyes, compute new coordinates: y1:=y1+(y2-y1)/(x2-x1)*(WindowX1-X1)
  1735. Dja, berechne x1:=x1+(x2-x1)/(y2-y1)*(WindowY1-y1), y1:=WindowY1
  1736. Eyes, compute x1:=x1+(x2-x1)/(y2-y1)*(WindowY1-y1), y1:=WindowY1
  1737. Din: (x,0) =
  1738. Ein: (x,0) =
  1739. Dof FOR
  1740. Eof FOR
  1741. Daktuelle Zeichenfarbe sei Weiss
  1742. Eset actual drawing color to white
  1743. DExistiert das Sprite noch nicht oder ist der Modus nicht er-
  1744. EIf the sprite doesn't exist yet (or the mode isn't allowed),
  1745. D199
  1746. E199
  1747. D#9
  1748. E#9
  1749. DDS:SI = Zeiger auf Daten, ES:DI = Zieladresse dafuer auf dem Schirm,
  1750. EDS:SI = pointer to data, ES:DI = dest. address on screen for them
  1751. D- maximale Spritegroesse 64k
  1752. E- maximal size of each sprite = 64k
  1753. DDX
  1754. EDX
  1755. DBX
  1756. EBX
  1757. DCX
  1758. ECX
  1759. DAX
  1760. EAX
  1761. Dnach
  1762. Eto
  1763. Danderenfalls keine Zeitueberwachung!
  1764. Eotherwise: no timing mechanism!
  1765. Dja, berechne: y1:=y1+(y2-y1)/(x2-x1)*(WindowX2-X1), x1:=WindowX2
  1766. Eyes, compute y1:=y1+(y2-y1)/(x2-x1)*(WindowX2-X1), x1:=WindowX2
  1767. Dja, berechne x1:=x1+(x2-x1)/(y2-y1)*(WindowY2-y1), y1:=WindowY2
  1768. Eyes, compute x1:=x1+(x2-x1)/(y2-y1)*(WindowY2-y1), y1:=WindowY2
  1769. Din: (x1,y1) =
  1770. Ein: (x1,y1) =
  1771. DAnzahl der zu vergleichenden Zeilen -1
  1772. Enumber of rows -1 to compare
  1773. DAnzahl der zu vergleichenden Spalten -1
  1774. Enumber of columns -1 to compare
  1775. Dabsolute Koord.
  1776. Eabsolute coord.
  1777. Dabgeschnitten sind:
  1778. Enot at the sides!):
  1779. D18..19 DW ?            ; licutoff_      | hit1xfirst
  1780. E18..19 DW ?            ; licutoff_      | hit1xfirst
  1781. D4*8000h physikalische Woerter (wg. den 4 Bit-
  1782. Ewords = 4*8000h physical words (because of 4
  1783. DCRT-Controller
  1784. ECRT-Controller
  1785. Dsprite[WORD PTR (licutoff_...)]
  1786. Esprite[WORD PTR (licutoff_...)]
  1787. Dsprite[WORD PTR licutoff_...]
  1788. Esprite[WORD PTR licutoff_...]
  1789. D"Succ", um BackTile[0] freizuhalten
  1790. E"succ", to hold free BackTile[0]
  1791. DDS wiederherstellen
  1792. Erestore DS
  1793. DcenterX
  1794. EcenterX
  1795. DdeltaX
  1796. EdeltaX
  1797. Dfalls Abweichung kleiner als bisheri-
  1798. Eif difference is less than the present
  1799. DDas ist zugleich die (Offset-)Quelladresse in Page 3
  1800. EThat's also the offset part of the source ad. in page3
  1801. Doberste Tilezeile:
  1802. Etop most tile row:
  1803. Dobere
  1804. Eupper
  1805. Dobere linke Bildschirmecke
  1806. Eupper left image corner
  1807. DModus 0 betrachtet die Farbe 0 als durchsichtig fuer den Hintergrund
  1808. Emode 0 considers color 0 being transparent for background data
  1809. Dmod
  1810. Emod
  1811. DCRTAddress
  1812. ECRTAddress
  1813. D- Routine zur exakten Feststellung der Kollision zweier Sprites
  1814. E- pixel precise hit-detection routine for sprite collisions built in
  1815. D(=x2last)
  1816. E(=x2last)
  1817. DcenterY
  1818. EcenterY
  1819. DdeltaY
  1820. EdeltaY
  1821. Danzuzeigende Bildschirmseite (0..3)
  1822. Egraphic page to be shown (0..3)
  1823. Dvon vorletzter Grafikzeile
  1824. Efrom last but one graphic row
  1825. DModus 2 ist fuer "Schatten" und aehnliches gedacht: hierbei werden die
  1826. Emode 2 is thought for "shadows" and the like: the sprite's data itself
  1827. Dmode
  1828. Emode
  1829. DHoehe
  1830. Eheight
  1831. Dab jetzt: BX=0 !
  1832. Efrom now on: BX=0!
  1833. Dmomentan aktuelle Palette
  1834. Eactually set palette
  1835. DModus 3 ist ebenfalls fuer "Schatten" gedacht: hierbei werden alle Sprite-
  1836. EModus3 is thought for "shadows", too: in this mode, all sprite
  1837. DTRUE/FALSE fuer "Sprites kollidieren"/"Sprites kollidieren nicht"
  1838. ETRUE/FALSE for "sprites collide"/"sprites do not collide"
  1839. DTRUE/FALSE, wenn die Maschine (mindestens) ein AT ist
  1840. ETRUE/FALSE, if the machine is (at least) an AT
  1841. DClipping-Algorithmus), Punkten und Grafik-Text (dto.), automatische Ver-
  1842. Ealgorithm), points and graphic-text (incl. clipping), automatic heap
  1843. DPlane0 = x,x,x,x,r,r
  1844. Eplane0 = x,x,x,x,r,r
  1845. DUmrechnung der angeg. Koordinaten in absolute Bildschirmkoordinaten
  1846. Ethe coordinates to absolute screen coordinates and evtl. necessary
  1847. Dimmer auf eine Segmentgrenze fällt. Diese Anfangsadressen werden
  1848. Elies on a segment (=paragraph) boundary. These starting addresses
  1849. Dum 1 Adresse weitersetzen!
  1850. Eneeds mending: increment address by 1!
  1851. Dim Map-Mask Register alle 4 Ebenen selektieren
  1852. Euse MapMask register to select all 4 planes
  1853. Dim MapMask Register alle 4 Ebenen selektieren
  1854. Euse MapMask register to select all 4 planes
  1855. Dim Bildschirmspeicher durchfuehren
  1856. Evideo ram
  1857. Dim Sequenzer das Speichermodusregister auswaehlen
  1858. Eselect memory-mode-register at sequencer port
  1859. Dimmer auf eine Segmentgrenze faellt. Diese Anfangsadressen werden
  1860. Elies on a segment (=paragraph) boundary. These starting addresses
  1861. DFarbe (0..255)
  1862. Ecolor (0..255)
  1863. Dnormal  : durchsichtig fuer Farbe 0
  1864. Enormal  : transparent for color 0
  1865. Dwobei WindowY1=0
  1866. Ehere, WindowY1=0
  1867. DoldMode = alter Grafikmodus
  1868. EoldMode = old graphicmode
  1869. Dmationszyklus (dann allerdings permanent)! (Deshalb ist es sinnvoll,
  1870. Eplace (but then, it stays permanent)! (For that reason, you normally
  1871. DDa eine Kachel 16x16 Punkte gross ist, muessen die Sprites ein Viel-
  1872. EBecause a tile consists of 16x16 points, the sprites must be a mul-
  1873. DTabelle der Grafikzeilen-Startadressen (Offset-Anteil)
  1874. Etable with graphic rows starting addresses (offset part)
  1875. Dja, Flag fuer "Punkt unterhalb des Fensters" bel.
  1876. Eyes, don't change flag for "point is below window"
  1877. Dja, Flag fuer "Punkt oberhalb des Fensters" bel.
  1878. Eyes, don't change flag for "point is above window"
  1879. DYaktuell
  1880. EYactual
  1881. Dpal
  1882. Epal
  1883. DRand: y:=((y AND $FFF0)-BackY1) DIV 16
  1884. Etop boundary: y:=((y AND $FFF0)-BackY1) DIV 16
  1885. DAH:=leftcut mod 4
  1886. EAH:=leftcut mod 4
  1887. DKompensation in Diagonalrichtung
  1888. Ecompensation in diagonal direction
  1889. DKoordinaten zulaessig
  1890. Ecoordinates admissible
  1891. Dabzuspeichernde Seite (0..2)
  1892. Epage to store (0..2)
  1893. Dabzuspeichernde Seite (=2)
  1894. Epage to be saved (=2)
  1895. Dnoch ein einzelnes Byte uebrig?
  1896. Edoes a single byte remain?
  1897. Ddoch, fertig!
  1898. Ebut yes, nothing to do!
  1899. Dhoehe1+hoehe2-(maxy-miny+1)-1
  1900. Ehoehe1+hoehe2-(maxy-miny+1)-1
  1901. Dhoehe1
  1902. Ehoehe1
  1903. DCode1
  1904. ECode1
  1905. DPAGEADR
  1906. EPAGEADR
  1907. DBACKGNDADR
  1908. EBACKGNDADR
  1909. Dals Defaulttile fuer den scrollbaren Hintergrund wurde #0 gesetzt
  1910. Etile #0 has been set as default tile for scrollable background
  1911. DIF offscreenFlag OR (xt<0) OR (xt>=XTiles)
  1912. EIF offscreenFlag OR (xt<0) OR (xt>=XTiles)
  1913. DIF offscreenFlag OR (xt-1<0) OR (xt-1>=XTiles)
  1914. EIF offscreenFlag OR (xt-1<0) OR (xt-1>=XTiles)
  1915. D4 Fuellbytes; schneller als 4 NOPs
  1916. E4 filling bytes; faster than 4 NOPs
  1917. D- Sprites koennen ihre Farbe in Abhaengigkeit ihres momentanen Hinter-
  1918. E- sprites can change their color depending on the underlying background
  1919. DES:DI=Zeiger auf Grafikadresse von Punkt1, DX=Zugriffsmaske dafuer
  1920. EES:DI=pointer to graphic address of point1, DX=access mask for it
  1921. DES:DI = Zeiger auf den besorgten Speicher
  1922. EES:DI = pointer to the acquired memory
  1923. DDS:SI = Zeiger auf erstes zu speicherndes Byte; ES:DI = Zieladr. dafuer
  1924. EDS:SI = pointer to first byte to store; ES:DI = its target address
  1925. DDS:SI := ES:DI  (Quellzeiger:=Zielzeiger)
  1926. EDS:SI := ES:DI  (source ptr:=dest. ptr)
  1927. DSinnvolle Werte fuer "pa" sind nur 0 und 1 (und evtl. BACK-
  1928. ESensible values for "pa" are either 0 or 1 (and evtl. BACK-
  1929. Dungefaehre Zeit (in Millisekunden), in der das geschehen soll
  1930. Etime (in millisceconds) for this action (approx.)
  1931. DAnzahl Pixel
  1932. Enumber of pixels
  1933. DDI:=y1
  1934. EDI:=y1
  1935. DCode2
  1936. ECode2
  1937. Dhoehe2
  1938. Ehoehe2
  1939. D100h-DL = gefundene optimale Farbe
  1940. E100h-DL = optimal color found
  1941. DREP MOVSB
  1942. EREP MOVSB
  1943. D- Verwaltung von bis zu 32767 verschiedenen Sprites (Voreinstellung: 1000)
  1944. E- up to 32767 different sprites (default: 1000)
  1945. DSchaltet der Benutzer (durch Angabe von milliseconds=0) die
  1946. EIf you don't use the timing mechanism (by supplying a value
  1947. Dschirm ragte)
  1948. Eof the screen)
  1949. DAchtung! Da PAGEADR immer die nichtsichtbare Grafikseite
  1950. EAttention! As PAGEADR always specifies the NOT visible gra-
  1951. Dy1un+y1  (=a)
  1952. Ey1un+y1  (=a)
  1953. Dx1re[Zeile]+x1  (=a)
  1954. Ex1re[row]+x1  (=a)
  1955. D=yt*XTiles+xt
  1956. E=yt*XTiles+xt
  1957. D+yoffset
  1958. E+yoffset
  1959. DDisplay_NORMAL
  1960. EDisplay_NORMAL
  1961. Dnach rechts scrollen
  1962. Escroll to the right
  1963. Dnach links scrollen
  1964. Escroll to the left
  1965. Dnach unten scrollen
  1966. Escroll downwards
  1967. Dnach oben scrollen
  1968. Escroll upwards
  1969. Dja, nichts zu tun
  1970. Eyes, ignore it
  1971. DDaten auf einen Satz uebertragen
  1972. Emove data as one block at once
  1973. Dnachfolgende NOP's ueberspringen
  1974. Ejump over following NOP's
  1975. Dragen wuerde: rechten cutoff bestimmen
  1976. Eboundary: compute right cutoff
  1977. Dnaechste Bitplane anwaehlen; bei einem wrap von
  1978. Eselect next bitplane; if wrap-around occurs
  1979. Dlativ codiert) zu falscher Adresse verzweigen!
  1980. ERELATIVE - and thus, jump to ever-neverland!
  1981. Ddazu Startadresse des Feldes addieren
  1982. Eadd start address of array to that
  1983. Dfaches von 16 Punkten in x- und y-Richtung sein
  1984. Etiple of 16 points in each direction (x _and_ y)
  1985. Ddass sie im Ring aufeinander zeigen, d.h.: sie bilden
  1986. Eset such that they build a "ring", that is: together
  1987. DDa als Hintergrundseite BACKGNDADR verwendet wird, ist die Verwen-
  1988. EBecause BACKGNDADR is used as background page, calling this rou-
  1989. Dmales Verhalten von TurboPascal's OutText-Routinen!)
  1990. Edon't change (=normal behaviour of TP's OutText-procs)
  1991. D------- ab hier: Sprites auf aktuelle Grafikseite bringen
  1992. E------- starting here: put sprites on actual graphic page
  1993. DPage-Wert in BX merken!
  1994. Esave page value to BX!
  1995. Dnaechste Plane anwaehlen
  1996. Eselect next plane
  1997. Dmax. Anzahl an Hintergrund-Kacheln
  1998. Emax. number of background tiles
  1999. DMaske wieder nach DX retten
  2000. Esave mask to DX again
  2001. DMaske fuer VRAM-Zugriff holen
  2002. Eget mask for VRAM-access
  2003. DMaske fuer Portzugriff laden
  2004. Eload mask for port-access
  2005. DMaske fuer naechsten Punkt berechnen
  2006. Ecompute mask for next point
  2007. DMaske auf 1 zuruecksetzen
  2008. Erestore mask to 1
  2009. Dja: Treffer in X-Richtung gefunden!
  2010. Eyes: collision in X-direction found!
  2011. Dja: Treffer gefunden!
  2012. Eyes: collision detected!
  2013. Dja, Zeitueberwachung soll benutzt werden
  2014. Eyes, time control mechanism shall be used
  2015. Dja, Punkte vertauschen
  2016. Eyes, swap points
  2017. Dja, nix zu tun
  2018. Eyes, nothing to do
  2019. Dja, Flag fuer "Punkt rechts vom Fenster" belassen
  2020. Eyes, don't change flag for "point is right of window"
  2021. Dja, Flag fuer "Punkt links vom Fenster" belassen
  2022. Eyes, don't change flag for "point is left of window"
  2023. Dja, Erhoehung von DI rueckgängig machen
  2024. Eyes, make incrementing DI undone
  2025. Dja, Ecke muss noch gezeichnet werden
  2026. Eyes, corner remains to be drawn
  2027. Dja, deltaY und Zeileninkrement negieren
  2028. Eyes, negate deltaY and row-increment
  2029. Dja, deltas vertauschen und Flag setzen
  2030. Eyes, swap deltas and set flag
  2031. Dja, Anzahl Tiles in diesem Spritefile ermitteln
  2032. Eyes, get number of tiles in that sprite file
  2033. DFarbtabelle uebernehmen
  2034. Eactivate new color table
  2035. DFarbe fuer Punkt holen
  2036. Eget color of point
  2037. DFarbdifferenz im Rotanteil berechnen:
  2038. Ecompute color difference for red color part:
  2039. DDazu kommen die oben abgeschnittenen Zeilen:
  2040. Eadditionaly: the rows cut off at the upper edge:
  2041. DDaten einer Zeile abspeichern
  2042. Estore data of one row
  2043. DDateilaenge ermitteln
  2044. Edetermine file length
  2045. DDarf keinenfalls unterbrochen werden!
  2046. EMay not be interrupted!
  2047. DRanddaten
  2048. Eboundary data
  2049. Dmax. Breite in 4er-Gruppen
  2050. Emax. width in groups of 4
  2051. Dmax_Breite_in_Punkten
  2052. Emax_width_in_points
  2053. Dmax_Breite_in_4er_Gruppen
  2054. Emax_width_in_groups_of_4
  2055. Dwaltungs des Heaps zum Speichern/Laden von Sprites, Hintergrundbildern,
  2056. Emanagement for storing/loading sprites, handling background images,
  2057. Dja, Fehlerquadrat und Farbe merken
  2058. Eyes, store square of error and color
  2059. Dja, bessere Naeherung koennen wir nicht mehr finden!
  2060. Eyes, we can't find any better solution than that!
  2061. DFarbpalette in ActualColors uebernehmen
  2062. Ecopy palette into ActualColors
  2063. DDatenregister auslesen:
  2064. Edata register:
  2065. DDaten ueber das zugehoerige Datenregister lesen
  2066. Eread in data via the according data register
  2067. Dja, Erhoehung von DI rueckgaengig machen
  2068. Eyes, make increase of DI undone
  2069. DSI auch
  2070. ESI, too
  2071. DSI = ((licutoff_in_Punkten+1) AND 3)*2
  2072. ESI = ((lecutoff_in_points+1) AND 3)*2
  2073. DSI = ((licutoff_in_Punkten+0) AND 3)*2
  2074. ESI = ((lecutoff_in_points+0) AND 3)*2
  2075. DSI = startx, DI = (Yaktuell+starty)*2
  2076. ESI = startx, DI = (Yaktuell+starty)*2
  2077. DDI=[@Starty_2+1]   = starty*2
  2078. EDI=[@Starty_2+1]   = starty*2
  2079. D(x,y)  =
  2080. E(x,y)  =
  2081. D40
  2082. E40
  2083. D80
  2084. E80
  2085. D#0
  2086. E#0
  2087. D10.
  2088. E10.
  2089. D100
  2090. E100
  2091. DSpalte
  2092. Ecolumn
  2093. D(physikalischen) Sprites gebildet werden, so muessen die
  2094. Ewhose load numbers aren't consecutive, then you
  2095. DSprite noch nicht geladen wurde!
  2096. Esprite has not been loaded yet!
  2097. DSpritedaten von Sprite
  2098. Esprite data of sprite
  2099. DSchreibmodus 0 (oder direkt:=$40)
  2100. Ewrite mode 0 (or directly :=$40)
  2101. Dupdate
  2102. Eupdate
  2103. DDS = normales Datensegment, ES = Grafikseitensegment,
  2104. EDS = normal data segment, ES = graphic page segment,
  2105. D- Scrollbares Hintergrundbild ebenfalls unterstuetzt
  2106. E- scrolling background image, too
  2107. D- Sprites werden beim Verschwinden an einer der Bildschirmgrenzen korrekt
  2108. E- correct clipping of sprites at the screen boundaries when moving on- or
  2109. Din
  2110. Ein
  2111. Dentsprechenden Stellen
  2112. Ewhere it will be needed
  2113. DAnzahl Bytes, die von...
  2114. Enumber of bytes, which have to be copied from...
  2115. Din der Datei so werden sie mit fortlaufender Nummer eingetragen,
  2116. Ehas been loaded, they will be stored with consecutive numbers, that
  2117. DEnthaelt die Datei mehrere Tiles, so werden sie zeilenweise geladen,
  2118. EIf the file contains more than one tile, they will be loaded by row,
  2119. Din Prozent zu der Helligkeit ihrer Originalfarben
  2120. Ein percentage of the brightness of the original colors
  2121. Dund auf aktueller Seite darstellen
  2122. Eand display on actual graphic page
  2123. Dund Wert holen
  2124. Eand fetch value
  2125. Dund fuer spaeter merken
  2126. Eand preserve it for later
  2127. DAnzahl zu zeichnende Zeilen
  2128. Enumber of rows to draw
  2129. Din: -
  2130. Ein: -
  2131. Din:
  2132. Ein:
  2133. DAnzahl abzuschneidende Zeilen
  2134. Enumber of lines to be cut off
  2135. DAnzahl der rechts abzuschneidenden Tile-Spalten
  2136. Enumber of right tile-columns to be cut off
  2137. DAnzahl der links abzuschneidenden Tile-Spalten
  2138. Enumber of left tile-columns to be cut off
  2139. DAnzahl der unten abzuschneidenden Tile-Zeilen
  2140. Enumber of bottom tile-rows to be cut off
  2141. Din neue_Tabelle[i] eintragen
  2142. Estore into neue_Tabelle[i]
  2143. DYMAX
  2144. EYMAX
  2145. DXMAX
  2146. EXMAX
  2147. D%0111
  2148. E%0111
  2149. Dschnell : keine Hintergrundberuecksichtigung
  2150. Efast    : don't take background into account
  2151. D30..31 DW ?            ;                | x1
  2152. E30..31 DW ?            ;                | x1
  2153. DVGAMono oder VGAColor - Adapter
  2154. Emonochrome or color VGA - adapter
  2155. Dabzuarbeitende Zeilenanzahl
  2156. Enumber of rows to process
  2157. DDI:=0*LINESIZE +(x div 4)=x div 4
  2158. EDI:=0*LINESIZE +(x div 4)=x div 4
  2159. DSI um cutoff in Bytes weitersetzen=leftcut div 4
  2160. Eincrement SI by cutoff (=leftcut div 4) bytes
  2161. DSchirm zu bringen; die Schnittstelle ist fuer alle gleich:
  2162. Ethe interface used is the same for all of them:
  2163. Dschied, dass die Spritefarbe 0 als fuer den Schatten durchsichtig betrach-
  2164. Ethat sprite color 0 is treated as being transparent for shadows
  2165. DSprungleiste zu @Sprite_fertig
  2166. Ejump-rail to @Sprite_fertig
  2167. DPlane3 = x,x,r,x,b,x
  2168. Eplane3 = x,x,r,x,b,x
  2169. DPlane2 = r,x,g,x,g,x
  2170. Eplane2 = r,x,g,x,g,x
  2171. DPlane1 = x,x,r,x,b,x
  2172. Eplane1 = x,x,r,x,b,x
  2173. D013E: OUT    DX,AL   ;Speichers=lineares Bitfeld
  2174. E013E: OUT    DX,AL   ;as a linear field of bits
  2175. D0135: OUT    DX,AL   ;adressierung von Daten im Bild-
  2176. E0135: OUT    DX,AL   ;addressing scheme of
  2177. DSpritenummer1
  2178. Espritenumber1
  2179. Dumgekehrt
  2180. Evice versa
  2181. D- maximaler Umfang aller Sprites zusammen nur durch Hauptspeicher begrenzt
  2182. E- maximal size of all loaded sprites only restricted by available memory
  2183. DRoutine nur fuer den Hintergrundmodus STATIC sinnvoll!
  2184. Ethis routine only makes sense when using mode STATIC!
  2185. Dmodus SCROLLING sinnvoll
  2186. Eas background mode!
  2187. DPROCEDURE
  2188. EPROCEDURE
  2189. DTRUE
  2190. ETRUE
  2191. D0115: MOV    AL,02   ;(=Map-Maske)
  2192. E0115: MOV    AL,02   ;register 2 (=Map-mask)
  2193. D010B: INC    DX      ;Dessen Daten ueber das zuge-
  2194. E010B: INC    DX      ;Read in its data, using the
  2195. Dx1,y1,x2,y2 = Koordinaten zweier Punkte,
  2196. Ex1,y1,x2,y2 = coordinates of two points,
  2197. DSpritenummer2*2
  2198. ESpritenumber2*2
  2199. DSpritenummer1*2
  2200. Espritenumber1*2
  2201. DSpritepositionsnummer*2
  2202. Espritepositionnumber*2
  2203. D41     DB 0            ; Modusnummer fuer Sprite
  2204. E41     DB 0            ; display mode used for sprite
  2205. DAdressen der temporaeren Variablen fuer die Kollisionspruefroutine:
  2206. Eaddresses of temporary variables for the collision detection routine:
  2207. Doder Err_NoSprite!
  2208. Eor Err_NoSprite!
  2209. D=GraphTextColor, so werden nur die Textpixel gezeichnet
  2210. Ethis value equals GraphTextColor, only the text-pixels
  2211. DVGA Identify-Adapter-Function unterstuetzt?
  2212. EVGA's identify-adapter-function supported?
  2213. DRGB-Anteile der Farbe, fuer die eine Naeherung zu finden ist
  2214. ERGB-parts of the color, for which we are seeking an approximation
  2215. DYTiles
  2216. EYTiles
  2217. DXTiles
  2218. EXTiles
  2219. DDer Punkt wird NICHT sofort sichtbar, sondern erst nach einem Anima-
  2220. EThe pixel will NOT be visible until the next animation cycle takes
  2221. DRealisiere "AX:=Offset_Adr[pa]":
  2222. Erealize "AX:=Offset_Adr[pa]":
  2223. Dmax_breite_in_4er
  2224. Emax_width_in_groups_of_4
  2225. Dwar, kommt hierher
  2226. Ebytes is placed here
  2227. Dnach Plane 3 kommt wieder Plane 0, aber
  2228. Eplane 0 follows after plane 3 again, but
  2229. DVariablen <>0 gesetzt worden, d.h.: ist der Ausschnitt _ganz_ ausser-
  2230. Ewill be set to something other then 0, that is: if the window lies
  2231. DKachelnspeicher
  2232. Etile memory
  2233. Dja, kein Treffer
  2234. Eyes, no collision
  2235. Dja, also sicherlich kein Treffer
  2236. Eyes, thus: surely no collision
  2237. D- arbeitet mit virtuellen Koordinaten im Bereich -16000..+16000, daher
  2238. E- works with virtual coordinates in the range -16000..+16000, thus
  2239. DPalette-Speicher
  2240. Epalette memory
  2241. Dabkuerzen
  2242. Etake short-cut
  2243. Dab hier: Hintergrund aus Kacheln zusammensetzen
  2244. Enow: create background image from tiles
  2245. Dabgeschnitten
  2246. Eoffscreen
  2247. DModus 1 schreibt die Daten sofort ohne weitere Untersuchung auf den Schirm
  2248. Emode 1 writes the data directly to the screen, without further processing
  2249. DStartVirtualX
  2250. EStartVirtualX
  2251. Dx,y
  2252. Ex,y
  2253. D%1110
  2254. E%1110
  2255. D#190
  2256. E#190
  2257. D#180
  2258. E#180
  2259. D#170
  2260. E#170
  2261. D#160
  2262. E#160
  2263. D#150
  2264. E#150
  2265. D#140
  2266. E#140
  2267. D#130
  2268. E#130
  2269. D#10
  2270. E#10
  2271. DC=1, wenn leftcut=0
  2272. EC=1, if leftcut=0
  2273. D0123: MOV    AX,DI   ;(wg. den 4 Bitplanes) auf 0
  2274. E0123: MOV    AX,DI   ;(because of chaining the 4 planes)
  2275. D011C: MOV    AX,A000 ;Ab Segment $A000
  2276. E011C: MOV    AX,A000 ;In segment $A000
  2277. Dy2un+y2  (=b)
  2278. Ey2un+y2  (=b)
  2279. Dx2re[Zeile]+x2  (=b)
  2280. Ex2re[row]+x2  (=b)
  2281. DAX:=y1ob+y1  (=c)
  2282. EAX:=y1ob+y1  (=c)
  2283. DAX:=x1li[Zeile]+x1  (=c)
  2284. EAX:=x1li[row]+x1  (=c)
  2285. D"Treffer!" nur dann ausgeben, falls auch mind. 1 Treffer in Y-Ri. existiert
  2286. Ereport "collision!" only, if there is at least 1 collision in Y-dir., too
  2287. Dnen Bitplanetabellen natuerlich mit diesen verbunden bleibt und deshalb
  2288. Eare (and remain) linked to these; therefore, they will be swapped too
  2289. DSatz des Pythagoras
  2290. EPythagorean proposition
  2291. Dwas_cut = TRUE/FALSE, falls ein zurechtstutzen des Bildausschnittes
  2292. Ewas_cut = TRUE/FALSE, if it was necessary/not necessary to clip the
  2293. Ddann in der Tabelle SPRITEAD[number] abgelegt; sind mehrere Sprites
  2294. Eare then stored in table SPRITEAD[number]; if more than one sprite
  2295. DZahl der bisher eingelesenen Sprites
  2296. Enumber of sprites already read in
  2297. DFarbe des Punktes
  2298. Ecolor of the point
  2299. Dmax. Anzahl an gleichzeitig geladenenen Sprites
  2300. Emax. number of simultaneously active sprites
  2301. Dja, Linie ganz innerhalb des Windows
  2302. Eyes, line is completely inside the window
  2303. Dja, Linie ganz ausserhalb des Windows
  2304. Eyes, line is completely outside the window
  2305. Din den Hintergrundspeicher uebernommen wird, d.h.: er ist nur
  2306. Eover into the background image, that is: it will be visible
  2307. Dund die umgebenden Pixel unveraendert gelassen (=nor-
  2308. Ethemselves will be drawn while the surrounding ones
  2309. DAnzahl zu uebertragender Woerter
  2310. Enumber of words to move
  2311. DIn anderen Worten: dieser Modus entspricht dem Modus 2, mit dem Unter-
  2312. EIn other words: this mode is equivalent to Modus2, with the exception
  2313. Dvon
  2314. Efrom
  2315. Dvon unten nach oben
  2316. Efrom bottom to top
  2317. Ddown
  2318. Edown
  2319. DFolge (Planes abwechselnd von oben nach unten lesen!
  2320. Esequence (alternately read planes from top to bottom!
  2321. DCohen-Algorithmus verwenden: 4 Bit-Code fuer links|rechts|oben|unten
  2322. Euse 4 bit-codes for: left|right|top|bottom
  2323. DSoll der Zyklus aus nicht direkt aufeinanderfolgenden
  2324. EIf the sprite cycle shall consist of (physical) sprites
  2325. Dkollidieren -> FALSE zurueckgeben
  2326. Eeither -> return FALSE
  2327. DFortsetzung von Modus2 - all das, was nicht mehr in 16 Bytes unterzubringen
  2328. EContinuation of mode2 - everything, which didn't fit in the reserved 16
  2329. DCohen-Algorithmus verwenden: 4 Bit-Code: links|rechts|oben|unten
  2330. Euse 4 bit-codes for: left|right|top|bottom
  2331. DCodesegment zu haben
  2332. Ethe code segment, too
  2333. DPointer auf zugehoerige Routine holen
  2334. Eget pointer to according routine
  2335. Dmoegliche Textausgaberichtungen
  2336. Epossible text directions
  2337. DModusbyte des Sprites holen
  2338. Eget mode byte of the sprite
  2339. DKorrekturfaktor fuer Zeilenzieladressen
  2340. Eadjustment for row target addresses
  2341. DKorrekturfaktor fuer Zeilenadressen
  2342. Eadjustment for row addresses
  2343. DKorrekturfaktor fuer Tilezeilenquelladressen
  2344. Eadjustment for source addresses of the tiles
  2345. DKopie von X in BX aufbewahren
  2346. Ehave a copy of X in BX
  2347. DKopie von leftcut in BX aufbewahren
  2348. Ehave a copy of leftcut in BX
  2349. DHoehe von Sprite2 in Punkten
  2350. Eheight of sprite2 in points
  2351. DHoehe um evtl. oberen cutoff korrigieren
  2352. Eevtl. adjust height for upper cutoff
  2353. DHoehe (in Zeilen)
  2354. Eheight (in rows)
  2355. Dmordsmaessige Abweichungen sofort ignorieren
  2356. Edon't tolerate huge color differences
  2357. DFortsetzung von Modus3 - all das, was nicht mehr in 16 Bytes unterzubringen
  2358. Econtinuation of Modus3 - everything, which didn't fit into 16 bytes
  2359. DMode-control-Register auswaehlen
  2360. Eselect mode control register
  2361. DS.o.: Sequenzerregister2 (=Map-Maske) waehlen,...
  2362. Es.a.: address sequencer reg. 2 (=map-mask),...
  2363. DStartVirtualY
  2364. EStartVirtualY
  2365. D%1101
  2366. E%1101
  2367. D%1011
  2368. E%1011
  2369. D#191
  2370. E#191
  2371. D#181
  2372. E#181
  2373. D#171
  2374. E#171
  2375. D#161
  2376. E#161
  2377. D#151
  2378. E#151
  2379. D#141
  2380. E#141
  2381. D#131
  2382. E#131
  2383. D#11
  2384. E#11
  2385. D#1
  2386. E#1
  2387. Dx1
  2388. Ex1
  2389. Dy1
  2390. Ey1
  2391. D11.
  2392. E11.
  2393. Ds1
  2394. Es1
  2395. Doder direkt :=$41
  2396. Eor directly :=$41
  2397. DDX:=y2ob+y2  (=d)
  2398. EDX:=y2ob+y2  (=d)
  2399. DDX:=x2li[Zeile]+x2  (=d)
  2400. EDX:=x2li[row]+x2  (=d)
  2401. DAX:=-x1old
  2402. EAX:=-x1old
  2403. Dfalls Wert
  2404. Eif value
  2405. Dlaubt, so geschieht nicht!
  2406. Enothing will happen at all!
  2407. DDabei wurde NICHT auf irgendwelche Retrace-Signale synchronisiert
  2408. EThe routine does NOT synchronize on any retrace-signal
  2409. DDabei wird auf die Darstellung der Seite 1-PAGE geschaltet
  2410. EThe display will be switched to graphic page 1-PAGE
  2411. DTabelle der Startadressen der 3 Routinen im Codesegment
  2412. Etable with the starting addresses of the 3 routines in the code segment
  2413. Dhat sich um 1 Byte erhoeht
  2414. Ehas increased by 1 byte
  2415. DFarbwert fuer den zu zeichnenden Punkt
  2416. Ecolor value for the pixel to be drawn
  2417. DPalette wurde uebernommen und evtl. ShadowTab neuberechnet
  2418. Epalette has been set and evtl., ShadowTab has been recomputed
  2419. DBP
  2420. EBP
  2421. Dunterstuetzte Darstellungsmodi der Sprites:
  2422. Esupported display modes for sprites:
  2423. DDI setzen, damit Stringbefehle verwendet werden koennen
  2424. Eset DI so that the string instructions can be used
  2425. DSI auf naechste Tilequellzeile setzen
  2426. Eset SI to next tile's source addr.
  2427. DSI auch zuruecksetzen
  2428. Ereset SI, too
  2429. DDI wieder auf Ursprungsadresse zuruecksetzen
  2430. Ereset DI to the source address
  2431. DDI und SI wieder zuruecksetzen
  2432. Ereset DI and SI registers
  2433. DDI auf naechste Zielzeile setzen
  2434. Eset DI to next destination row
  2435. DDI auf naechste Zeile setzen
  2436. Eset DI to next row
  2437. Dvon ANIMATE auszufuehren, da der gezeichnete Punkt sonst so-
  2438. Ecalling ANIMATE, because otherwise, your drawn pixel will
  2439. D#192
  2440. E#192
  2441. D#182
  2442. E#182
  2443. D#172
  2444. E#172
  2445. D#162
  2446. E#162
  2447. D#152
  2448. E#152
  2449. D#142
  2450. E#142
  2451. D#132
  2452. E#132
  2453. D#12
  2454. E#12
  2455. D(16+3-i-rightcut) SHR 2
  2456. E(16+3-i-rightcut) SHR 2
  2457. D(16+3-i-leftcut) SHR 2
  2458. E(16+3-i-leftcut) SHR 2
  2459. D0112: MOV    DX,03C4 ;S.o.: Sequenzer-Register 2
  2460. E0112: MOV    DX,03C4 ;s.a.: address sequencer-
  2461. Dymax
  2462. Eymax
  2463. Dxmax
  2464. Exmax
  2465. DAX:=y1ob[Spalte]
  2466. EAX:=y1ob[column]
  2467. Dbzw.
  2468. Eor
  2469. DJetzt die unteren Tiles, die nicht seitlich abgeschnitten sind:
  2470. ENow the lower tiles, which are not partially cut at their left or right:
  2471. Dgenau dasselbe fuer unteren Bildschirmrand
  2472. Eexactly the same for the lower screen border
  2473. Dred
  2474. Ered
  2475. Dtet wird!
  2476. Etoo!
  2477. DZeiger auf per GetImage() gespeichertes Bild
  2478. Epointer to image memory, allocated by GetImage()
  2479. Dend_min_start
  2480. Eend_min_start
  2481. Din den Hintergrund gezeichnet (sofern er im sichtbaren Bereich liegt)
  2482. Ehas been drawn into the background (if it is onscreen)
  2483. Dinaktive Sprites koennen auch nicht
  2484. Einactive sprites can't collide
  2485. Dentscheidet, welcher Alg. Anwendung findet
  2486. Edetermines, which algorithm will be used
  2487. DAnfangsadressen der 4 Bitplanes berechnen; dabei evtl. linken cutoff mit
  2488. ECompute starting addresses of the 4 bitplanes; take into account evtl.
  2489. Dund gezeichnet (sofern er auf dem sichtbaren Bildschirmfenster liegt)
  2490. Eand has been drawn (if it lies within the visible window)
  2491. Dentsprechenden Eintraege in NextSprite[] manuell gemacht
  2492. Ehave to make the appropriate entries into NextSprite[]
  2493. Denthaelt jetzt den Gebietscode fuer Punkt
  2494. Eholds the area code for point
  2495. Dunter diesen Punkten befindet, wird gegen den korrespondierenden Farbwert
  2496. Eunderneath these pixels will be replaced by the corresponding color entry
  2497. DSpritenummer, dessen Modusbyte abgefragt werden soll
  2498. Esprite number, which mode byte shall be read out
  2499. DSpriteY_virtuell
  2500. ESpriteY_virtual
  2501. DSp = SpriteLADEnummer, dessen Modusbyte veraendert werden soll
  2502. ESp = spriteLOADnumber, which mode byte shall be changed
  2503. D#193
  2504. E#193
  2505. D#183
  2506. E#183
  2507. D#173
  2508. E#173
  2509. D#163
  2510. E#163
  2511. D#153
  2512. E#153
  2513. D#143
  2514. E#143
  2515. D#133
  2516. E#133
  2517. D#13
  2518. E#13
  2519. D0100: MOV    AX,0013 ;Mit BIOS Grafikmodus $13
  2520. E0100: MOV    AX,0013 ;Use BIOS to switch to
  2521. D(Segment-)Quelladresse ist die Seite SCROLLPAGE
  2522. E(segment part of) source addr. is page SCROLLPAGE
  2523. D*2, da Word-Werte!
  2524. E*2, because word-sized!
  2525. Dy2ob[Spalte]
  2526. Ey2ob[column]
  2527. DDiese Routine dauert ihre Zeit (ca. 4 sec auf 8MHz-AT!)
  2528. EThis routine takes some time (about 4 sec on a 8MHz-AT!)
  2529. DDisplay_FAST
  2530. EDisplay_FAST
  2531. DDisplay_SHADOWEXACT
  2532. EDisplay_SHADOWEXACT
  2533. Dberechne
  2534. Ecompute
  2535. Dwelche Schreib-Plane
  2536. Ewhich write plane
  2537. Dwenn topcut=0 ist, braucht die oberste
  2538. Eif topcut=0, the upper tile row doesn't
  2539. Dwenn leftcut=0 ist, muss die linke obere
  2540. Eif leftcut=0, the upper left corner does
  2541. Dnein, kopiere die Routine an die
  2542. Eno, copy routine to all places
  2543. Djetzt gilt: (pl_adr?,breite?) enthalten die Source-
  2544. Eprecondition here: (pl_adr?,breite?) contain the
  2545. Dgestutzt; sollte die Gerade keinen sichtbaren Teil besitzen, so wurde
  2546. Eif the line is completely offscreen, the program jumped directly to
  2547. Dges Minimum ist die Farbe j der neue
  2548. Eminimum, then the new color j will be
  2549. Dgelesen, die sich an der Spriteposition befinden und deren Farbwerte
  2550. Eposition is read in and these color values will be exchanged against
  2551. Dden musste
  2552. Eoff
  2553. Dbereits aktiv ist, deshalb wurden sie
  2554. Euntil a graphic mode has been activated;
  2555. Dferten Werte!
  2556. Ethe results supplied by GetImage!
  2557. DUebertrag bedeutet sofortiges Ende
  2558. Ecarry set means: end at once
  2559. DZeiger auf erstes zu kopierendes Tilebyte
  2560. Epointer to first tile byte to copy
  2561. DSegmentadresse der Hintergrundseite
  2562. Esegment address of background page
  2563. Dder Hintergrundseite
  2564. Ein the background page
  2565. Dnein, naechste Spalte (-> Word-Werte!)
  2566. Eno, next column (-> word-sized values!)
  2567. DJetzt evtl. noch die untere rechte Eck-Tile:
  2568. ENow evtl. the lower right corner-tile remains to be drawn:
  2569. Djede Kachelzeile ist XTiles breit, jede Kachel 16x16 Punkte
  2570. Ea tile row has width XTiles, each tile consists of 16x16 points
  2571. DLeseplane
  2572. Eplane to read from
  2573. Drechte
  2574. Eright
  2575. DZeile
  2576. Erow
  2577. DRealisiere "AX:=Offset_Adr[Page]":
  2578. Erealize "AX:=Offset_Adr[Page]":
  2579. Dneue, aktuelle Grafikseite(nadresse)
  2580. Enew, actual graphic page(address)
  2581. Dgerade aktuellen Farben "ActualColors" gesetzt; die Palette wurde
  2582. Ewill become set to the actually set colors of "ActualColors"; the
  2583. Dgerade aktuelle Farbpalette
  2584. Eactually set color palette
  2585. DTrick damit Code relokatibel wird!
  2586. Etrick to make code relocatible!
  2587. Din der Farbe COLOR in den Hintergrundspeicher gezeichnet; die Rou-
  2588. E(using the color COLOR) into the background page; the routine it-
  2589. DAb Segment A000h nun 8000h logische Woerter=
  2590. Estarting in segment A000h, set 8000h logical
  2591. D50..?? DB Daten
  2592. E50..?? DB data
  2593. D10..11 DW Hoehe in Zeilen
  2594. E10..11 DW heigth in rows             (in German: "Hoehe")
  2595. DAchsen- und Punktsymmetrie ausnutzen
  2596. Euse axial- and point symmetrie
  2597. DSchreibplane anwaehlen
  2598. Eselect write plane
  2599. DSchreibmodus 0 waehlen
  2600. Eselect write mode 0
  2601. DSchrittweite beim laden
  2602. E"step" needed for correct addressing
  2603. DEcke nicht gesondert gezeichnet werden
  2604. Enot need to be drawed separately
  2605. DAchtung! Die Werte koenn(t)en nur dann
  2606. EAttention! These values can/could be
  2607. DSchreib-Plane anwaehlen
  2608. Eselect write plane
  2609. DSchreibplane 3 waehlen
  2610. Echoose write plane 3
  2611. DSchreibplane 2 waehlen
  2612. Echoose write plane 2
  2613. DSchreibplane 1 waehlen
  2614. Echoose write plane 1
  2615. DSchreibplane 0 waehlen
  2616. Echoose write plane 0
  2617. DSchreibmodus 1 waehlen
  2618. Echoose write mode 1
  2619. DSchreibmodus 0 setzen
  2620. Eset write mode 0
  2621. DSchleife wird genau "tiles" mal durchlaufen
  2622. Eloop will be taken exactly "tiles" times
  2623. DactIndex fuer naechste Tilezeile justieren:
  2624. Eadjust actIndex for next tile-row:
  2625. DSchatten
  2626. ESchatten
  2627. Dthen [ endy:=199-SpriteY
  2628. Ethen [ endy:=199-SpriteY
  2629. D..14)
  2630. E..14)
  2631. D#194
  2632. E#194
  2633. D#184
  2634. E#184
  2635. D#174
  2636. E#174
  2637. D#164
  2638. E#164
  2639. D#154
  2640. E#154
  2641. D#144
  2642. E#144
  2643. D#14
  2644. E#14
  2645. D#134
  2646. E#134
  2647. D0119: MOV    AL,0F   ;...und Zugriff auf alle 4
  2648. E0119: MOV    AL,0F   ;...and allow access to all
  2649. DSucc(XMAX)
  2650. ESucc(XMAX)
  2651. DSucc(YMAX)
  2652. ESucc(YMAX)
  2653. D320
  2654. E320
  2655. DAX:=hoehe1+hoehe2-(maxy-miny+1)-1  (=ueberlappy-1)
  2656. EAX:=hoehe1+hoehe2-(maxy-miny+1)-1  (=ueberlappy-1)
  2657. DCX:=breite1+breite2-(maxx-minx+1)-1  (=ueberlappx-1)
  2658. ECX:=breite1+breite2-(maxx-minx+1)-1  (=ueberlappx-1)
  2659. D#250
  2660. E#250
  2661. D#240
  2662. E#240
  2663. D#230
  2664. E#230
  2665. D#220
  2666. E#220
  2667. D#210
  2668. E#210
  2669. D#200
  2670. E#200
  2671. D#20
  2672. E#20
  2673. Dzeigt noch auf Spritedaten, muss aber auf
  2674. Estill points to sprite data, but must
  2675. DZeiger auf
  2676. Epointer to
  2677. DGrafikzeile
  2678. Egraphic row
  2679. DErr_InvalidFade, falls nicht zulaessiger Alg. gewaehlt wurde
  2680. EErr_InvalidFade, if illegal "style" value has been used
  2681. DGroesse einer Bitplane
  2682. Esize of one bitplane
  2683. Dwrap in den Bitplanes bedeutet: Startadresse
  2684. Ewrapping the bitplane means: start address
  2685. DBreite einer Zeile fuer die erste, zweite,
  2686. EWidth of a row for the first, second,
  2687. Ddritte und vierte Bitplane
  2688. Ethird and fourth bitplane, respectively
  2689. DBreite
  2690. Ewidth
  2691. DBreite dieser Zeile
  2692. Ewidth of this line
  2693. DGrafikseite
  2694. Egraphic page
  2695. DGraphTextColor=Textfarbe
  2696. EGraphTextColor=color for text
  2697. DZeitueberwachung explizit ab, so wird das durch IsAT:=$80,
  2698. Eof 0 milliseconds), this will result in IsAT:=$80, that is
  2699. DSegmentadressen der Grafikseiten (bei Offset = 0) :
  2700. Esegment addresses of graphic pages (with offset = 0):
  2701. DFehlerquadrat = 0?
  2702. Esquare of error = 0?
  2703. DErsatz fuer "LOOP @outerloop"; naechste Farbe!
  2704. Ereplacement for "LOOP @outerloop"; next color!
  2705. Dcolor
  2706. Ecolor
  2707. Dnoetig war/nicht noetig war
  2708. Efetched image
  2709. Dwo und wieviel des Bildes abgeschnitten wer-
  2710. Eand how much of the image had to been clipped
  2711. Dnommen, d.h.: er ist nur einen Animationszyklus lang sichtbar!
  2712. Eimage, that is: it will be visible only for one animation cycle!
  2713. Dnoch mit derselben Adresse ansprechbar?
  2714. Estill addressable with the same address?
  2715. Dkommt spaeter
  2716. Ecomes later
  2717. DColor
  2718. EColor
  2719. Dkoennte auch ausgerechnet werden ueber:
  2720. Ecould also be computed by:
  2721. DSpritebyte holen
  2722. Efetch sprite byte
  2723. DSprungleiste fuer NOHIT (passt hier gut hin)
  2724. Ejump-rail for NOHIT (this is a good place)
  2725. DSpritepositionsnummer*2 retten
  2726. Esave spritepositionnumber*2
  2727. DSpriteheader auf Heap bringen
  2728. Estore sprite header to heap
  2729. DSprite noch nicht geladen
  2730. Esprite not yet loaded
  2731. DSprite muss schon geladen sein
  2732. Esprite must already be loaded
  2733. DSprite kann sich nicht selbst treffen
  2734. Esprite can't collide with itself
  2735. DSpeicher auf dem Heap besorgen
  2736. Eget memory from the heap
  2737. DSpritedaten
  2738. Esprite data
  2739. DSpritedatum holen...
  2740. Eget sprite data...
  2741. D#195
  2742. E#195
  2743. D#185
  2744. E#185
  2745. D#175
  2746. E#175
  2747. D#165
  2748. E#165
  2749. D#155
  2750. E#155
  2751. D#15
  2752. E#15
  2753. D#145
  2754. E#145
  2755. D#135
  2756. E#135
  2757. DBX so verringern, dass es zusammen mit SI zugleich
  2758. Echange BX such that (together with SI) it can be
  2759. DDX=3CEh
  2760. EDX=3CEh
  2761. DDX=3C4h
  2762. EDX=3C4h
  2763. D12..15 DB 1,2,4,8      ; Translate-Tabelle fuer Port-Ansteuerung
  2764. E12..15 DB 1,2,4,8      ; translate-table used for port-accesses
  2765. DAX:=Kachel*64 =Kachel SHL 6 =(Kachel SHL 8) SHR 2
  2766. EAX:=tile*64 =tile SHL 6 =(tile SHL 8) SHR 2
  2767. DCX (BX) = Spritenummer von Sprite 1 (2)
  2768. ECX (BX) = spritenumber of sprite 1 (2)
  2769. Dx2+breite2-1
  2770. Ex2+breite2-1
  2771. D#251
  2772. E#251
  2773. D#241
  2774. E#241
  2775. D#231
  2776. E#231
  2777. D#221
  2778. E#221
  2779. D#211
  2780. E#211
  2781. D#21
  2782. E#21
  2783. D#201
  2784. E#201
  2785. Dnein: geringe Steigung
  2786. Eno: small slope
  2787. Dueberhang
  2788. Eoverhang
  2789. DAendern von Spritedarstellungsmodi waehrend der Laufzeit, Geschwindig-
  2790. Echanging sprite display modes at runtime, adjustment for different
  2791. Dmaxx
  2792. Emaxx
  2793. Dmax
  2794. Emax
  2795. Drerand1
  2796. Ererand1
  2797. Dgelesen werden muessen: 0 = Planereihenfolge (1,2,3,4); 1=(2,3,4,1);
  2798. Eof the heap: 0 = plane order (1,2,3,4); 1 = plane order (2,3,4,1);
  2799. Dueberlappy-1
  2800. Eueberlappy-1
  2801. Dkein MOVSW, da Writemode 1!
  2802. Eno MOVSW, as we use write mode 1!
  2803. Dkein "MOVSW", da Writemode1!
  2804. Eno "MOVSW", as we use write mode1
  2805. Dkeine "MOVSW", da Writemode1!
  2806. Eno "MOVSW", as we use write mode1
  2807. DName des zu ladenden Sprite-Files (Typ: "*.COD" / "*.LIB" )
  2808. Ename of the sprite file to load (type: "*.COD" / "*.LIB")
  2809. Dabsolut
  2810. Eabsolute
  2811. Dob die Sprites z.Z. gerade sichtbar sind oder nicht.
  2812. Evisible (=onscreen) or not!
  2813. Dabsolut!
  2814. Eabsolute!
  2815. D- beliebiges Hintergrundbild, vor der die Animation geschieht
  2816. E- arbitrary background image for the animation
  2817. DPortadresse des Statusregisters
  2818. Eport address of state register
  2819. DPortadresse des CRT-Adressregisters
  2820. Eport address of CRT-address register
  2821. DDI=Zielzeiger:=(bildschirmstartx+0) DIV 4 +zeilenadr
  2822. EDI=dest.ptr:=(ScreenStartX+0) DIV 4 +zeilenadr
  2823. DSI = index = Tilenummer
  2824. ESI = index = tile number
  2825. DPICHeader
  2826. EPICHeader
  2827. Dsowie evtl. notwendige Clipping-Schritte aus.
  2828. Eclipping actions.
  2829. DKoordinaten des def. Bereiches
  2830. Ecoordinates of the defined area
  2831. Dkoennte auch berechnet werden (fuer x>xmax-16) gemaess
  2832. Ecould also be computed (for x>xmax-16) by
  2833. D#196
  2834. E#196
  2835. D#186
  2836. E#186
  2837. D#176
  2838. E#176
  2839. D#166
  2840. E#166
  2841. D#16
  2842. E#16
  2843. D#156
  2844. E#156
  2845. D#146
  2846. E#146
  2847. D#136
  2848. E#136
  2849. DDisplay_NORMAL, Display_FAST oder Display_SHADOW
  2850. EDisplay_NORMAL, Display_FAST or Display_SHADOW
  2851. DDisplay_SHADOW
  2852. EDisplay_SHADOW
  2853. D#252
  2854. E#252
  2855. D#242
  2856. E#242
  2857. D#232
  2858. E#232
  2859. D#222
  2860. E#222
  2861. D#22
  2862. E#22
  2863. D#212
  2864. E#212
  2865. D#202
  2866. E#202
  2867. D#2
  2868. E#2
  2869. Dy2
  2870. Ey2
  2871. Dx2
  2872. Ex2
  2873. D12.
  2874. E12.
  2875. Ds2
  2876. Es2
  2877. DNextSprite[] wurde so gesetzt, dass jedes Sprite sein eigener Nach-
  2878. ENextSprite[] has been set in such a way that every sprite is its
  2879. Dneuer PAGE-Wert := 1-alter PAGE-Wert, d.h.:
  2880. Enew PAGE-value := 1-old PAGE-value, that is:
  2881. Dgewuenschte Helligkeit der Farben im Schattenbereich,
  2882. Ewanted brightness for the colors in the shadow area,
  2883. D32..33 DW ?            ;                | x2
  2884. E32..33 DW ?            ;                | x2
  2885. Dmaxy
  2886. Emaxy
  2887. Dermitteln, ob Farb- oder Monochromdarstellung
  2888. Esee if we are using color-/monochorme display
  2889. D(etwas spaeter wird dann DS (ES) = Segment der Spr.daten von Spr.1 (2) )
  2890. E(a bit later, DS (ES) becomes segment addr. of sprite data of spr. 1 (2) )
  2891. Dweitergesetzt: liefert (richtige) (4,8,12,...)
  2892. Erection of +1 byte: this results in (4,8,12,...)
  2893. D= (endy-starty)*2 =Yaktuell*2
  2894. E= (endy-starty)*2 =Yaktuell*2
  2895. DSegment der Spritedaten2
  2896. Esegment of 2nd sprite's data
  2897. Drerand2
  2898. Ererand2
  2899. D[end_min_start]    = (endy-starty)*2 =Yaktuell*2
  2900. E[end_min_start]    = (endy-starty)*2 =Yaktuell*2
  2901. Dendx
  2902. Eendx
  2903. Dendx-startx
  2904. Eendx-startx
  2905. Dorand1
  2906. Eorand1
  2907. Durand1
  2908. Eurand1
  2909. Dbreite1+breite2-(maxx-minx+1)
  2910. Ebreite1+breite2-(maxx-minx+1)
  2911. DAnzahl Bytes um 1 erhoehen (wg. LODSB)
  2912. Einc. number of bytes by 1 (-> LODSB!)
  2913. Dvon links nach rechts/umgekehrt
  2914. Efrom left to right/vice versa
  2915. Dvon oben nach unten/umgekehrt
  2916. Efrom bottom to top/vice versa
  2917. Dbottom_cut
  2918. Ebottom_cut
  2919. Dtop_cut
  2920. Etop_cut
  2921. DVIRTUELLE Punktkoordinaten des zu zeichnenden Punktes
  2922. EVIRTUAL pixel coordinates of the point to be written
  2923. DVIRTUELLE Punktkoordinaten des auszulesenden Punktes
  2924. EVIRTUAL pixel coordinates of the point to be read
  2925. DSoll von der gerade SICHTBAREN Seite gelesen werden, so ist
  2926. EIf you want to read from the actually VISIBLE page, then
  2927. DSoll auf die gerade SICHTBARE Seite gezeichnet werden, so ist
  2928. EIf you want to draw at the actually VISIBLE graphic page
  2929. Dfort wieder verschwindet!)
  2930. Evanish at once!)
  2931. Dfolger ist
  2932. Eown successor
  2933. DKonstanten fuer Hintergrundart
  2934. Econstants for background mode
  2935. Dyoffset
  2936. Eyoffset
  2937. Dtopcut
  2938. Etopcut
  2939. Dbottomcut
  2940. Ebottomcut
  2941. Dsonst wird BP von TP wiederhergestellt
  2942. Eelse, BP will be restored by TP itself
  2943. Dup
  2944. Eup
  2945. DSp
  2946. ESp
  2947. D0131: INC    DX      ;Wert aus zugehoerigem
  2948. E0131: INC    DX      ;read out value of its
  2949. D#197
  2950. E#197
  2951. D#187
  2952. E#187
  2953. D#177
  2954. E#177
  2955. D#17
  2956. E#17
  2957. D#167
  2958. E#167
  2959. D#157
  2960. E#157
  2961. D#147
  2962. E#147
  2963. D#137
  2964. E#137
  2965. D#127
  2966. E#127
  2967. D0..255 = Tilenummer fuer das erste Sprite der Datei
  2968. E0..255 = tile number for the file's first sprite
  2969. Dlicutoff_in_Punkten:=-SpriteX]
  2970. Elecutoff_in_points:=-SpriteX]
  2971. D#253
  2972. E#253
  2973. D#243
  2974. E#243
  2975. D#233
  2976. E#233
  2977. D#23
  2978. E#23
  2979. D#223
  2980. E#223
  2981. D#213
  2982. E#213
  2983. D#203
  2984. E#203
  2985. D1,2,4,8 fuer BX=0,1,2,3
  2986. E1,2,4,8 for BX=0,1,2,3
  2987. D(etwas frei:)
  2988. E(a bit lax:)
  2989. Dneue_Tabelle[i]
  2990. Eneue_Tabelle[i]
  2991. DAL=100h-DL = beste Naeherung
  2992. EAL=100h-DL = best approximation
  2993. DDefaultfarbpalette des Modus $13
  2994. Edefault color palette of mode $13
  2995. DAH:=BackTile[index]
  2996. EAH:=BackTile[index]
  2997. DTHEN index:=0 ELSE index:=actIndex
  2998. ETHEN index:=0 ELSE index:=actIndex
  2999. Din: (0,y) =
  3000. Ein: (0,y) =
  3001. Din: (x,y) = (
  3002. Ein: (x,y) = (
  3003. Din: (x,y) =
  3004. Ein: (x,y) =
  3005. Dendy
  3006. Eendy
  3007. DCL enthaelt den Gebietscode fuer Punkt 2, CH den fuer Punkt 1
  3008. ECL holds the area code for point 2, CH the one for point 1
  3009. Dorand2
  3010. Eorand2
  3011. Durand2
  3012. Eurand2
  3013. DGrafikseite, von der der Ausschnitt zu sichern ist (0..2)
  3014. Egraphic page from which the image should be taken (0..2)
  3015. DGrafikseite, auf der gezeichnet werden soll (0..2)
  3016. Egraphic page to be drawn upon (0..2)
  3017. Dif bildschirmstartx>xmax then skip_zeile
  3018. Eif ScreenStartX>xmax then skip_zeile
  3019. DOffsetanteil der Startadresse
  3020. Eoffset part of the start address
  3021. DDI:=orand2+2*hit2xfirst
  3022. EDI:=orand2+2*hit2xfirst
  3023. D10 Bytes Platzhalter
  3024. E10 bytes to fill up
  3025. D<0 bedeutet: neue Farbe waere heller!
  3026. E<0 means: new color would be brighter!
  3027. D40     DB 1            ; Versionsnummer
  3028. E40     DB 1            ; version number
  3029. DactIndex:=(ytil-1)*XTiles-1, "+xtil" kommt spaeter
  3030. EactIndex:=(ytil-1)*XTiles-1, "+xtil" follows later
  3031. Dy1 in absolute Koordinaten umrechnen
  3032. Etransform y1 into absolue coordinates
  3033. Dx1 in absolute Koordinaten umrechnen
  3034. Etransform x1 into absolue coordinates
  3035. D0139: OUT    DX,AL   ;auswaehlen
  3036. E0139: OUT    DX,AL
  3037. D0136: DEC    DX      ;schirmspeicher durchfuehren
  3038. E0136: DEC    DX      ;video data
  3039. D0132: IN     AL,DX   ;Datenregister auslesen
  3040. E0132: IN     AL,DX   ;data register
  3041. D0130: OUT    DX,AL   ;auswaehlen
  3042. E0130: OUT    DX,AL
  3043. D012B: MOV    DX,03D4 ;CRT-Controller ansteuern
  3044. E012B: MOV    DX,03D4 ;address CRT-controller
  3045. D0125: MOV    CX,8000 ;setzen
  3046. E0125: MOV    CX,8000 ;to 0
  3047. D011B: OUT    DX,AL   ;Bitmaps erlauben
  3048. E011B: OUT    DX,AL   ;4 bitmaps
  3049. D0117: OUT    DX,AL   ;auswaehlen,...
  3050. E0117: OUT    DX,AL
  3051. D0111: OUT    DX,AL   ;Neuen Wert wirksam machen
  3052. E0111: OUT    DX,AL   ;tell it to the VGA card
  3053. D010F: OR     AL,04   ;Bit 2:=1:kein odd/even-Mechan.
  3054. E010F: OR     AL,04   ;bit 2:=1:no odd/even-mechanism
  3055. D010D: AND    AL,F7   ;Bit 3:=0:4 Planes nicht chainen
  3056. E010D: AND    AL,F7   ;bit 3:=0:don't chain bitplanes
  3057. D010C: IN     AL,DX   ;hoerige Datenregister einlesen
  3058. E010C: IN     AL,DX   ;appropriate data register
  3059. D010A: OUT    DX,AL   ;auswaehlen
  3060. E010A: OUT    DX,AL   ;for the VGA's memory management
  3061. D0103: INT    10      ;(=320x200x256) setzen
  3062. E0103: INT    10      ;mode $13 (=320x200x256)
  3063. D"11b" werden also beim Rechtsschieben eh abgeschnitten!
  3064. E"11b" will be cut off while shifting right, anyway!
  3065. D0..1   DW Plane_0_Daten
  3066. E0..1   DW offset_ptr_to_plane0_data
  3067. D#198
  3068. E#198
  3069. D#188
  3070. E#188
  3071. D#18
  3072. E#18
  3073. D#178
  3074. E#178
  3075. D#168
  3076. E#168
  3077. D#158
  3078. E#158
  3079. D#148
  3080. E#148
  3081. D#138
  3082. E#138
  3083. D#128
  3084. E#128
  3085. Dadresse um 1 Byte weitergesetzt werden
  3086. Eing address must be incremented by 1 byte
  3087. D(d.h.: nicht abgeschnittene) Tiles zeichnen:
  3088. E(that is: all non-cut) tiles:
  3089. DAdressen der temporaeren Variablen fuer die Zeichenroutinen:
  3090. Eaddresses of temporary variables for the drawing routines:
  3091. D--- da Abkuerzung genommen wurde: WriteMode 0 wieder setzen!
  3092. E--- short cut has been taken: thus, reset write mode 0!
  3093. D#254
  3094. E#254
  3095. D#244
  3096. E#244
  3097. D#24
  3098. E#24
  3099. D#234
  3100. E#234
  3101. D#224
  3102. E#224
  3103. D#214
  3104. E#214
  3105. D#204
  3106. E#204
  3107. Ddazu DI um (zu zeichnende Zeilen)*LINESIZE
  3108. Ethus, decrement DI by (rows to draw)*
  3109. DBreite fuer diese Zeile in Punkten +3
  3110. Ewidth of this row in pixels +3
  3111. D#30
  3112. E#30
  3113. Dif
  3114. Eif
  3115. DOffsetadressen der Grafikseiten (in Segment $A000):
  3116. Eoffset addresses of the graphic pages (in segment $A000):
  3117. Dist globale Variable
  3118. Eis a global variable
  3119. D200 Zeilen zu je 320/4 Bytes
  3120. E200 rows at 320/4 bytes each
  3121. DScrollRange definierten Bereiches liegen, erhalten TileNr als
  3122. ESetBackgroundScrollRange will become the tile TileNr as
  3123. DSchatten: Farbumsetzung anhand des Hintergrundes
  3124. Eshadow  : color lookup driven by background data
  3125. Dschritte aus.
  3126. Eclipping actions.
  3127. DSchreibmodus
  3128. Ewrite mode
  3129. DActualColors
  3130. EActualColors
  3131. Dschneller als
  3132. Efaster than
  3133. DSpaltenzaehler
  3134. Ecolumn counter
  3135. DSpriteLADEnummer
  3136. EspriteLOADnumber
  3137. DSpriteN[?]=Spriteladenummer
  3138. ESpriteN[?]=Spriteloadnumber
  3139. DSpriteladenummer
  3140. Esprite load number
  3141. D#199
  3142. E#199
  3143. D#19
  3144. E#19
  3145. D#189
  3146. E#189
  3147. D#179
  3148. E#179
  3149. D#169
  3150. E#169
  3151. D#159
  3152. E#159
  3153. D#149
  3154. E#149
  3155. D#139
  3156. E#139
  3157. D#129
  3158. E#129
  3159. DCX=breite2 brauchen wir spaeter nochmal
  3160. ECX=breite2 will be needed later again
  3161. D#255
  3162. E#255
  3163. D#25
  3164. E#25
  3165. D#245
  3166. E#245
  3167. D#235
  3168. E#235
  3169. D#225
  3170. E#225
  3171. D#215
  3172. E#215
  3173. D#205
  3174. E#205
  3175. Dnein, alles ok
  3176. Eno, everything ok
  3177. DBP:=2*DY-DX
  3178. EBP:=2*DY-DX
  3179. D(Yaktuell+starty)*2
  3180. E(Yactual+starty)*2
  3181. D#31
  3182. E#31
  3183. DoffscreenFlag
  3184. EoffscreenFlag
  3185. Drbgbrxxx
  3186. Erbgbrxxx
  3187. Dist es gleich 0?
  3188. Eis it zero?
  3189. Dist leftcut=0  <=>  rightcut=0
  3190. Eleftcut=0 is equivalent to rightcut=0
  3191. D>=0, quadrieren (um Differenzquadrat
  3192. E>=0, square it (we are going to
  3193. D"0" als Ergebniswert zurueckgeliefert
  3194. Ewill return "0" as the result
  3195. D20..21 DW ?            ; zeilenadr      | hit1yfirst
  3196. E20..21 DW ?            ; zeilenadr      | hit1yfirst
  3197. DSpritenummern der darzustellenden Sprites
  3198. Espritenumber of sprite to be displayed
  3199. Dgeht, weil
  3200. Eworks, because
  3201. DSeite, deren Inhalt sichtbar gemacht werden soll
  3202. Epage, which contents will be made visible
  3203. DZeit in Millisekunden, in der dies geschehen soll
  3204. Etime in milliseconds for this action
  3205. DSeite, die auf die aktuelle Seite eingeblendet werden soll
  3206. Epage which shall be faded onto the actually visible page
  3207. D#26
  3208. E#26
  3209. D#246
  3210. E#246
  3211. D#236
  3212. E#236
  3213. D#226
  3214. E#226
  3215. D#216
  3216. E#216
  3217. D#206
  3218. E#206
  3219. Ddessen Modusbyte abgefragt werden soll
  3220. Ewhich mode byte shall be determined
  3221. Ddefinierten Bereiches in "x" mittels der Formel:
  3222. Ethe defined area and store it to "x", formula:
  3223. Dder Routine nur fuer den Hintergrundmodus STATIC sinnvoll!
  3224. Eroutine only makes sense when using background mode STATIC!
  3225. Dwerden soll
  3226. Eread out
  3227. DSeite, auf der gezeichnet werden soll
  3228. Epage to be drawn upon
  3229. DMethode, mit der Sp ab sofort dargestellt werden soll:
  3230. Emethod, which shall be used to display Sp from now on:
  3231. Dneuer Rotanteil
  3232. Enew red part
  3233. DProgrammtool zur Realisierung schneller Animationen auf der VGA-Grafik-
  3234. EProgramtool for the realization of fast animations on the VGA-graphic-
  3235. DZeitmechanismus geht nur auf AT/386
  3236. Etiming mechanism only works on AT/386
  3237. DSpriteN[],SPRITEAD[] wurden auf "gaenzlich leer" initialisiert
  3238. ESpriteN[],SPRITEAD[] have been initialized to "completely empty"
  3239. Dauch nach [yoffset_]
  3240. Estore it in [yoffset_], too
  3241. DDX=3CEh -> Leseplane 3 waehlen
  3242. EDX=3CEh -> choose read plane 3
  3243. DDX=3CEh -> Leseplane 1 waehlen
  3244. EDX=3CEh -> choose read plane 1
  3245. DDX=3C4h -> Schreibplane setzen
  3246. EDX=3C4h -> set write plane
  3247. DCX=[licutoff_]= licutoff_in_Punkten,
  3248. ECX=[licutoff_]= licutoff_in_points,
  3249. DCX Bytes von DS:SI nach ES:BX uebertragen
  3250. Ecopy CX bytes from DS:SI to ES:BX
  3251. DAX Zeilen unten abschneiden
  3252. Ecut off AX rows at the bottom
  3253. DAX Punkte rechts abschneiden
  3254. Ecut off AX points at the right
  3255. DCX=[licutoff_]   = licutoff_in_Punkten
  3256. ECX=[licutoff_]   = lecutoff_in_points
  3257. DAX:=0 setzen
  3258. Eset AX:=0
  3259. DRetracesignal und schaltet dann auf die so fertiggestellte Seite um.
  3260. Eretrace signal and then flips display to this completed page.
  3261. D#27
  3262. E#27
  3263. D#247
  3264. E#247
  3265. D#237
  3266. E#237
  3267. D#227
  3268. E#227
  3269. D#217
  3270. E#217
  3271. D#207
  3272. E#207
  3273. Drem:
  3274. Erem:
  3275. Djetzt wieder normales Programm
  3276. Enow back at "normal" program
  3277. DArt, wie das geschehen soll
  3278. Ethe way how this shall be done
  3279. DGrafikseite(nsegment), aus der gelesen werden soll
  3280. Egraphic page(segment) to be read from
  3281. DGrafikseite(nsegment), auf der gezeichnet werden soll
  3282. Egraphic page(segment) to be drawn upon
  3283. DGrafikseite, in die der Bildausschnitt kopiert werden soll
  3284. Egraphic page to which the cutting shall be pasted to
  3285. DGrafikseite (0..3), auf der gezeichnet werden soll
  3286. Egraphic page (0..3) to be drawn upon
  3287. DGrafikseite, auf der der Text ausgegeben werden soll
  3288. Egraphic page where the text shall be written
  3289. DGraphTextOrientation="vertical" oder "horizontal"
  3290. EGraphTextOrientation="vertical" or "horizontal"
  3291. DGroesse Vielfaches von 16?
  3292. Esize a multiple of 16?
  3293. D#3
  3294. E#3
  3295. D13.
  3296. E13.
  3297. DEs wurde eine Linie von den VIRTUELLEN Punkten (x1,y1) nach (x2,y2)
  3298. EA line has been drawn between the VIRTUAL points (x1,y1) and (x2,y2)
  3299. DOR
  3300. EOR
  3301. DStartVirtualX,StartVirtualY = 0 (d.h.: virtuelle = absolute Koord.)
  3302. EStartVirtualX,StartVirtualY =0 (that is: virtual = absolute coord.)
  3303. DSprite(header)aufbau:
  3304. Esprite header format:
  3305. D0/1, wenn PAGE vorher 1/0 war
  3306. E0/1, if PAGE has been 1/0, respectively
  3307. D0137: MOV    AL,17   ;Mode-control-Register
  3308. E0137: MOV    AL,17   ;select mode-control-register
  3309. D012E: MOV    AL,14   ;Underline-location-Register
  3310. E012E: MOV    AL,14   ;choose underline-location-register
  3311. D0121: SUB    DI,DI   ;4*$8000 physikalische Woerter
  3312. E0121: SUB    DI,DI   ;=4*$8000 physical words
  3313. D011F: MOV    ES,AX   ;$8000 logische Woerter=
  3314. E011F: MOV    ES,AX   ;clear $8000 logical words
  3315. D0108: MOV    AL,04   ;das Speichermodus-Register
  3316. E0108: MOV    AL,04   ;the register being responsible
  3317. Doder
  3318. Eor
  3319. Dy2 in absolute Koordinaten umrechnen
  3320. Etransform y2 into absolue coordinates
  3321. Dx2 in absolute Koordinaten umrechnen
  3322. Etransform x2 into absolue coordinates
  3323. Dp2 auf Segmentgrenze bringen
  3324. Emake p2 fall on segment boundary
  3325. D42..43 DW linke_Begrenzungen
  3326. E42..43 DW offset_ptr_to_left_boundary_data
  3327. Dletzte Spalte erneuern:
  3328. Eupdate last column:
  3329. Dneue Zeile sichtbar machen:
  3330. Emake new row visible:
  3331. DZeilen
  3332. Erows
  3333. DTeiler von
  3334. Edivisor of
  3335. D#28
  3336. E#28
  3337. D#248
  3338. E#248
  3339. D#238
  3340. E#238
  3341. D#228
  3342. E#228
  3343. D#218
  3344. E#218
  3345. D#208
  3346. E#208
  3347. Dnein, uebertragen
  3348. Eno, store to screen
  3349. Dzeugen, muesste diese Tabelle zu jeder Farbe eine dunklere enthalten)
  3350. Ethis table should hold a darker color for each of the original colors)
  3351. Dverwendet werden!
  3352. Efor other purposes!
  3353. Dverringern (N.B.: BX=zu zeichnende Zeilen)
  3354. ELINESIZE (N.B.: BX=number of rows to draw)
  3355. DDer Hintergrundspeicher BACKGNDPAGE wird mit dem Inhalt der an-
  3356. EThe background page BACKGNDPAGE has been filled with the con-
  3357. Drechtsschieben!
  3358. E2 bits to the right!
  3359. DJetzt wird keine Variable aus dem Stack mehr gebraucht: BP kann
  3360. ENow there is no further variable on stack, so BP can be used
  3361. DJetzt alle vollstaendig im Inneren des Bildschirms gelegenen
  3362. ENow draw all tiles which are completely onscreen
  3363. Dder Spritenummer zuordnen:
  3364. Eassign it to the sprite number:
  3365. Dbeste Naeherungswert: ihn selbst (in
  3366. Ethe new optimum: store that optimum
  3367. Dbei "was_cut"=TRUE darueber Auskunft geben,
  3368. Ebeen set to TRUE, they will report, where and
  3369. Dwerden
  3370. Eyourself manually
  3371. Dsein, sowie die Register BP,DS,ES unveraendert lassen!!!!!!!!!!!!!
  3372. ECATIBLE and MAY NOT CHANGE registers BP,DS and ES!!!!!!!!!!!!!!!!!
  3373. Drechts unten!
  3374. Eright corner to the lower right!
  3375. Dpermanent bleiben, so muss sie in den Hintergrund gezeichnet werden!)
  3376. Eit shall stay permanent, you have to draw it into the background!)
  3377. Dleft_cut= evtl. noetiger linker Cutoff des Bildausschnittes (gibt an,
  3378. Eleft_cut= evtl. needed left cut off of the image (this determines,
  3379. Ddes Hintergrundes "sofort" sichtbar werden!)
  3380. Ethe background will be visible "at once"!)
  3381. Ddes Animationspaketes aufgerufen werden
  3382. Ebeginning - for initializing the whole package properly
  3383. Dbezeichnet, liest diese Routine auch von dort die Punkte ein!
  3384. Ephic page, this routine will read from there, too!
  3385. Dbeim Aufruf als Seite "1-PAGE" anzugeben!
  3386. Ethen you must call the routine with pa=1-PAGE!
  3387. DAenderungen (durch ANIMATE) sofort sichtbar werden)
  3388. Echanges will become visible (via ANIMATE) at once)
  3389. DZeitueberwachung starten
  3390. Estart time control mechanism
  3391. DZeitueberwachung fuer naechsten Zyklus starten:
  3392. Estart time control mechanism for next cycle:
  3393. DZeilenzaehler verringern
  3394. Edecrease row counter
  3395. DZeilenzaehler retten
  3396. Esave row counter
  3397. DZeiger auf Farbumsetztabelle setzen
  3398. Eset pointer to color lookup table
  3399. DZeichenfarbe fuer Linien
  3400. Edrawing color for lines
  3401. DWert nicht mehr pushen!
  3402. Edo not push value again!
  3403. DSeitennummer muss 0..2 sein
  3404. Epage number must be 0..2
  3405. DDefaultwert in ShadowTab ist 70% Helligkeit der Ursprungsfarben!
  3406. Edefault value of ShadowTab is 70% of the original color brightness!
  3407. DText wurde auf dem Bildschirm ausgegeben
  3408. Etext has been written to the screen
  3409. Dden Fehler in Worten
  3410. Ethe error described in words
  3411. Dnein, Flag ruecksetzen
  3412. Eno, reset flag
  3413. Dnein, Adr. muss(te) um 1 erhoeht werden
  3414. Eno, address had to be incremented by 1
  3415. Dnein
  3416. Eno
  3417. DLese-Plane anwaehlen
  3418. Eselect read plane
  3419. DLesezugriff auf passende Plane ermoeglichen
  3420. Eenable read access for correct plane
  3421. DLeseplane 3 waehlen
  3422. Echoose read plane 3
  3423. DLeseplane 2 waehlen
  3424. Echoose read plane 2
  3425. DLeseplane 2 setzen
  3426. Eset read plane 2
  3427. DLeseplane 1 waehlen
  3428. Echoose read plane 1
  3429. DLeseplane 0 waehlen
  3430. Echoose read plane 0
  3431. DLesemodus 0 setzen
  3432. Eset read mode 0
  3433. DKennung in Bilderdateien
  3434. Etag in picture files
  3435. Dkein Treffer, wenn
  3436. Eno collision, if
  3437. DJetzt: "SpriteN[?]:=SpriteN[NextSprite[?]]" berechnen:
  3438. ENow: compute "SpriteN[?]:=SpriteN[NextSprite[?]]"
  3439. DJetzt Planebreiten:
  3440. ENow the plane widths:
  3441. DJetzt eigentliche Spritedaten einlesen:
  3442. ENow read in the real sprite data:
  3443. Djetzt den "Rest" des Sprites laden
  3444. Eload the "rest" of the sprite
  3445. Djetzt den Spriteheader vià BLOCKREAD auf den Heap laden
  3446. Eload sprite header vià BLOCKREAD into the heap
  3447. DJetzt Bresenham-Parameter berechnen
  3448. Ecompute Bresenham-parameters
  3449. Dgenug Platz reservieren
  3450. Eget enough space
  3451. Drechte untere Ecke dazu (alles virtuelle Koordinaten!)
  3452. Eaccording lower right corner (in virtual coordinates!)
  3453. Dderen zugehoergigen (virtuellen) Koordinaten
  3454. Etheir (virtual) coordinates
  3455. DKennung fuer Bilderdateien
  3456. Etag for picture files
  3457. Ddeklariert werden
  3458. Eor other sprites pixel by pixel
  3459. DDefault-Helligkeit von Schatten
  3460. Edefault brightness of shadows
  3461. Dneue Farbe darf nicht heller sein!
  3462. Enew color may not be brighter!
  3463. DFehlerquadrat berechnen
  3464. Ecompute square of error
  3465. Dbessere Approximation gefunden?
  3466. Edid we find a better approximation?
  3467. DLeseplane nach AH bringen
  3468. Eload read plane into AH
  3469. DNeuen Wert wirksam machen
  3470. Eactivate new settings
  3471. Dkeine Farbe gefunden?
  3472. Eno color found?
  3473. Dnein, also nochmal suchen
  3474. Eno, thus search again
  3475. Dtemporaere Palette mit aktuellen Farben vorbesetzen
  3476. Epreset temporary palette with actual colors
  3477. DDer fuer das Bild reservierte Heap-Speicher wurde freigegeben
  3478. Ethe heap memory allocated for the image has been released
  3479. D...nach BH
  3480. E...into BH
  3481. D...nach DH
  3482. E...into DH
  3483. D2*(DY-DX)
  3484. E2*(DY-DX)
  3485. D2*DY-DX
  3486. E2*DY-DX
  3487. Dof FOR j
  3488. Eof FOR j
  3489. DDI:=miny-maxy=-(maxy-miny)
  3490. EDI:=miny-maxy=-(maxy-miny)
  3491. DSollte dies nicht moeglich sein (oder liegt der Bildausschnitt gaenz-
  3492. EIf that is impossible (or the image is completely offscreen), the
  3493. DPAGE = aktuell dargestellte Grafikseite
  3494. EPAGE = actually displayed graphic page
  3495. DPAGESIZE = Groesse einer Bitplane
  3496. EPAGESIZE = size of one bitplane
  3497. Dstyle
  3498. Estyle
  3499. Dsteile Linie?
  3500. Esteep line?
  3501. Ddto. fuer anderes Sprite
  3502. Edto. for other sprite
  3503. Ddto., letzte Zeile
  3504. Edto., last row
  3505. DStartplane
  3506. Estartplane
  3507. Ddto., rechte untere Ecke
  3508. Edto., lower right corner
  3509. D- gleichzeitige Darstellung von bis zu 32767 Sprites (Voreinstellung: 500)
  3510. E- up to 32767 sprites may be simultaneously active (default: 500)
  3511. DSprite <>0, d.h.: ueberhaupt aktiv?
  3512. Esprite <>0, that is: sprite active?
  3513. D013C: OR     AL,40   ;Bit 6:=1: Adressierung des
  3514. E013C: OR     AL,40   ;bit 6:=1: address memory
  3515. Ds1,s2 = Spritepositionsnummern zweier Sprites
  3516. Es1,s2 = sprite position numbers of two sprites
  3517. DAdressen von wichtigen Werten innerhalb des Spriteheaders:
  3518. Eaddresses of important values inside the sprite header:
  3519. D0, d.h.: keine Mindestzeit fuer einen Animationszyklus
  3520. E0, that is: no min. time for animation cycle
  3521. D#29
  3522. E#29
  3523. D#249
  3524. E#249
  3525. D#239
  3526. E#239
  3527. D#229
  3528. E#229
  3529. D#219
  3530. E#219
  3531. D#209
  3532. E#209
  3533. Derste Spalte erneuern:
  3534. Eupdate first column:
  3535. DWritemode 0 wiederherstellen
  3536. Erestore write mode 0
  3537. DWritemode 1 setzen
  3538. Eset write mode 1
  3539. DGrafikmodus muss natuerlich bereits initialisiert worden sein
  3540. Egraphic mode must have been initialized already
  3541. DBreite zuerst ablegen...
  3542. Estore width first...
  3543. DGrafikseite (0..3), von der der Punkt ausgelesen
  3544. Egraphic page (0..3), from which the point shall be
  3545. DWriteMode 1 waehlen
  3546. Echoose write mode 1
  3547. DWritemode 0 setzen
  3548. Eselect write mode 0
  3549. DGrafikseite mit Hintergrundmuster fuellen
  3550. Efill graphic page with background pattern
  3551. DBreite in 4er-Gruppen
  3552. Ewidth in groups of 4
  3553. DBreite und Hoehe des gewaehlten Bereiches in Kacheln
  3554. Ewidth and height of the chosen range in tiles
  3555. Dgrundes veraendern ("Schattenfunktion")
  3556. Eimage (-> shadow function)
  3557. DCH
  3558. ECH
  3559. DBH
  3560. EBH
  3561. DAH
  3562. EAH
  3563. DDH
  3564. EDH
  3565. D2*DY
  3566. E2*DY
  3567. DRoutine trotzdem "was_cut"=FALSE!
  3568. Eroutine still returns "was_cut"=FALSE!
  3569. D34..35 DW ?            ;                | y1
  3570. E34..35 DW ?            ;                | y1
  3571. DactIndex
  3572. EactIndex
  3573. Ddto. fuer Breite und linken cutoff
  3574. Edto. for width and left cutoff
  3575. DStart-Schreibplane (Start-LESEplane=0)
  3576. E1st write plane (1st READ plane=0!)
  3577. Dx1last
  3578. Ex1last
  3579. Dx1+breite1-1  (=x1last)
  3580. Ex1+breite1-1  (=x1last)
  3581. Dy1last
  3582. Ey1last
  3583. D0133: AND    AL,BF   ;Bit 6:=0: keine Doppelwort-
  3584. E0133: AND    AL,BF   ;bit 6:=0: no double word
  3585. D0105: MOV    DX,03C4 ;Sequenzer ansteuern und dort
  3586. E0105: MOV    DX,03C4 ;Address sequencer and choose
  3587. Doder rightcut, denn da 320 durch 16 teilbar ist,
  3588. Eor "rightcut": because 320 is dividable by 16,
  3589. DAL=0 zugleich als Init-Wert benutzen
  3590. Euse AL=0 as starting value, too
  3591. DAL mit 0 vorbesetzen
  3592. Epreset AL with 0
  3593. D2=(3,4,1,2); 3=(4,1,2,3); zu beachten ist, dass die Breiten der einzel-
  3594. E2=(3,4,1,2); 3=(4,1,2,3); note that the widths of the bitplane tables
  3595.